From: Richard Biener Date: Tue, 6 May 2014 10:46:18 +0000 (+0000) Subject: c-opts.c (c_common_post_options): For -freestanding... X-Git-Tag: releases/gcc-5.1.0~7763 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b15458becf4086c463cba0c42db1d8780351201b;p=thirdparty%2Fgcc.git c-opts.c (c_common_post_options): For -freestanding... 2014-05-06 Richard Biener c-family/ * c-opts.c (c_common_post_options): For -freestanding, -fno-hosted and -fno-builtin disable pattern recognition if not enabled explicitely. From-SVN: r210100 --- diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index 3c9732395d36..e347b3274773 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,9 @@ +2014-05-06 Richard Biener + + * c-opts.c (c_common_post_options): For -freestanding, + -fno-hosted and -fno-builtin disable pattern recognition + if not enabled explicitely. + 2014-05-02 Marek Polacek * c.opt (Wsizeof-pointer-memaccess): Describe option. diff --git a/gcc/c-family/c-opts.c b/gcc/c-family/c-opts.c index e162e49a18a8..29e9a355beed 100644 --- a/gcc/c-family/c-opts.c +++ b/gcc/c-family/c-opts.c @@ -851,6 +851,12 @@ c_common_post_options (const char **pfilename) if (flag_objc_exceptions && !flag_objc_sjlj_exceptions) flag_exceptions = 1; + /* If -ffreestanding, -fno-hosted or -fno-builtin then disable + pattern recognition. */ + if (!global_options_set.x_flag_tree_loop_distribute_patterns + && flag_no_builtin) + flag_tree_loop_distribute_patterns = 0; + /* -Woverlength-strings is off by default, but is enabled by -Wpedantic. It is never enabled in C++, as the minimum limit is not normative in that standard. */