diff options
author | Neil Booth <neil@daikokuya.demon.co.uk> | 2002-05-09 22:48:36 +0000 |
---|---|---|
committer | Neil Booth <neil@gcc.gnu.org> | 2002-05-09 22:48:36 +0000 |
commit | 3df892916c733cfa42ffa9eaaab1c115ebfe45ce (patch) | |
tree | 8450e93598f1089a0cde24353bf2a3ffbbdee87e /gcc/doc | |
parent | 32fa4565a7d89525a0577f2bffed598f1d1d9194 (diff) | |
download | gcc-3df892916c733cfa42ffa9eaaab1c115ebfe45ce.zip gcc-3df892916c733cfa42ffa9eaaab1c115ebfe45ce.tar.gz gcc-3df892916c733cfa42ffa9eaaab1c115ebfe45ce.tar.bz2 |
Makefile.in: Update.
* Makefile.in: Update.
* c-common.c (flag_iso, flag_undef, cb_register_builtins,
builtin_define_std): New.
(c_common_init): Register CPP builtins callback.
* c-common.h (flag_iso, flag_undef): New.
* c-decl.c (c_decode_option): Set flag_iso and flag_undef.
* c-lex.c: Don't include target.h.
(cb_register_builtins): Move to c-common.c.
(init_c_lex): Don't register hook here.
* c-lex.h (builtin_define, builtin_assert, builtin_define_std): New.
(cpp_define, cpp_assert): Remove.
* gcc.c (cc1_options): Pass -undef to front end.
* target-def.h (TARGET_REGISTER_CPP_BUILTINS): Remove.
(TARGET_INITIALIZER): Update.
* target.h (struct cpp_reader): Don't predeclare.
(struct gcc_target): Remove cpp builtin hook.
* tree.c (default_register_cpp_builtins): Remove.
cp:
* cp-tree.h (flag_ansi): Remove.
* decl2.c (flag_ansi): Remove.
(cxx_decode_option): Set flag_iso and flag_undef.
doc:
* tm.texi: Update.
From-SVN: r53349
Diffstat (limited to 'gcc/doc')
-rw-r--r-- | gcc/doc/tm.texi | 37 |
1 files changed, 25 insertions, 12 deletions
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi index b70ae48..f382796 100644 --- a/gcc/doc/tm.texi +++ b/gcc/doc/tm.texi @@ -622,19 +622,32 @@ The macro @code{STANDARD_STARTFILE_PREFIX}. @c prevent bad page break with this line Here are run-time target specifications. -@deftypefn {Target Hook} void TARGET_REGISTER_CPP_BUILTINS (cpp_reader *@var{pfile}) -This macro expands to a target-specific function, called by the C -family of front ends, that allows you to define preprocessor built-in -macros and assertions at run-time. - -Pass the argument (a preprocessor handle) as the first argument to the -functions @code{cpp_define} and @code{cpp_assert}, declared in -@file{c-lex.h}. The second argument is the same as the argument to -the respective command-line option, for example @code{__mips__} for -@code{cpp_define}, and @code{cpu=mips} for @code{cpp_assert}. -@end deftypefn - @table @code +@findex TARGET_REGISTER_CPP_BUILTINS +@item TARGET_REGISTER_CPP_BUILTINS +This macro expands to a block of code that defines target-specific +built-in preprocessor macros and assertions, using the functions +@code{builtin_macro}, @code{builtin_macro_std} and +@code{builtin_assert} declared in @file{c-lex.h}. + +@code{builtin_assert} takes a string in the form you pass to the +command-line option @option{-A}, such as @code{cpu=mips}, and creates +the assertion. @code{builtin_macro} takes a string in the form +accepted by option @option{-D} and unconditionally defines the macro. + +@code{builtin_macro_std} takes a string representing the name of an +object-like macro. If it doesn't lie in the user's namespace, +@code{builtin_macro_std} defines it unconditionally. Otherwise, it +defines a version with two leading underscores, and another version +with two leading and trailing underscores, and defines the original +only if an ISO standard was not requested on the command line. For +example, passing @code{unix} defines @code{__unix}, @code{__unix__} +and possibly @code{unix}; passing @code{_mips} defines @code{__mips}, +@code{__mips__} and possibly @code{_mips}, and passing @code{_ABI64} +defines only @code{_ABI64}. + +This macro obsoletes the @code{CPP_PREDEFINES} target macro. + @findex CPP_PREDEFINES @item CPP_PREDEFINES Define this to be a string constant containing @option{-D} options to |