diff options
author | Neil Booth <neil@daikokuya.demon.co.uk> | 2002-05-16 19:09:40 +0000 |
---|---|---|
committer | Neil Booth <neil@gcc.gnu.org> | 2002-05-16 19:09:40 +0000 |
commit | 748d29c1fc6cb2209a1da6e0536168d2b6e78af7 (patch) | |
tree | ef69824f78f40bb0b12f54abb92bfa60441f8a3b /gcc/c-common.c | |
parent | 5279d7394efe3e6d39e9c5f0bbb066e63f4cf398 (diff) | |
download | gcc-748d29c1fc6cb2209a1da6e0536168d2b6e78af7.zip gcc-748d29c1fc6cb2209a1da6e0536168d2b6e78af7.tar.gz gcc-748d29c1fc6cb2209a1da6e0536168d2b6e78af7.tar.bz2 |
c-common.c (cb_register_builtins): Handle more built-ins here rather than in gcc.c specs.
* c-common.c (cb_register_builtins): Handle more built-ins
here rather than in gcc.c specs.
* gcc.c (cpp_unique_options): Move many built-ins to c-common.c.
(cpp_options): Pass -O flags even when only preprocessing.
* toplev.c (set_fast_math_flags): New prototype.
(fast_math_flags_set_p): New.
(set_no_fast_math_flags): Remove.
(decode_f_option): Update.
* toplev.h (set_fast_math_flags): Update.
(fast_math_flags_set_p): New.
(set_no_fast_math_flags): Remove.
config:
* c4x/c4x.c (c4x_override_options): Update.
From-SVN: r53526
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r-- | gcc/c-common.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c index 81810dd..c799e95 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -4351,6 +4351,23 @@ cb_register_builtins (pfile) /* Misc. */ builtin_define_with_value ("__VERSION__", version_string, 1); + /* Other target-independent built-ins determined by command-line + options. */ + if (optimize_size) + cpp_define (pfile, "__OPTIMIZE_SIZE__"); + if (optimize) + cpp_define (pfile, "__OPTIMIZE__"); + + if (flag_hosted) + cpp_define (pfile, "__STDC_HOSTED__=1"); + else + cpp_define (pfile, "__STDC_HOSTED__=0"); + + if (fast_math_flags_set_p ()) + cpp_define (pfile, "__FAST_MATH__"); + if (flag_no_inline) + cpp_define (pfile, "__NO_INLINE__"); + /* A straightforward target hook doesn't work, because of problems linking that hook's body when part of non-C front ends. */ TARGET_CPU_CPP_BUILTINS (); |