summaryrefslogtreecommitdiffstats
path: root/gcc/cpplib.h
diff options
context:
space:
mode:
authorneil <neil@138bc75d-0d04-0410-961f-82ee72b054a4>2002-05-04 20:15:00 +0000
committerneil <neil@138bc75d-0d04-0410-961f-82ee72b054a4>2002-05-04 20:15:00 +0000
commit9a85d74bf1eccd35410ac36138d185ea9698d389 (patch)
treea2449890a6a273739539cb635907054553cde2bb /gcc/cpplib.h
parent40855b3039fe63b317142ae2cdb591b4fef02d95 (diff)
downloadppe42-gcc-9a85d74bf1eccd35410ac36138d185ea9698d389.tar.gz
ppe42-gcc-9a85d74bf1eccd35410ac36138d185ea9698d389.zip
* Makefile.in (c-lex.o): Update.
* c-lex.c: Include target.h. (cb_register_builtins): New. (init_c_lex): Set builtins callback. * c-lex.h (cpp_define, cpp_assert): New prototypes. * cppinit.c (init_builtins): Use callback, including for GXX_WEAK. * cpplib.h (struct cpp_callbacks): New member. * target-def.h (TARGET_REGISTER_CPP_BUILTINS): New. (TARGET_INITIALIZER): Update. * target.h (struct gcc_target): New hook. * tree.c (default_register_cpp_builtins): New. * tree.h (default_register_cpp_builtins): New. doc: * tm.texi (TARGET_REGISTER_CPP_BUILTINS): Document. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53165 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cpplib.h')
-rw-r--r--gcc/cpplib.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/cpplib.h b/gcc/cpplib.h
index 9063647f6db..72f4884e419 100644
--- a/gcc/cpplib.h
+++ b/gcc/cpplib.h
@@ -406,6 +406,9 @@ struct cpp_callbacks
void (*undef) PARAMS ((cpp_reader *, unsigned int, cpp_hashnode *));
void (*ident) PARAMS ((cpp_reader *, unsigned int, const cpp_string *));
void (*def_pragma) PARAMS ((cpp_reader *, unsigned int));
+ /* Called when the client has a chance to properly register
+ built-ins with cpp_define() and cpp_assert(). */
+ void (*register_builtins) PARAMS ((cpp_reader *));
};
#define CPP_FATAL_LIMIT 1000
@@ -557,6 +560,8 @@ extern cppchar_t
cpp_interpret_charconst PARAMS ((cpp_reader *, const cpp_token *,
int, unsigned int *, int *));
+/* Used to register builtins during the register_builtins callback.
+ The text is the same as the command line argument. */
extern void cpp_define PARAMS ((cpp_reader *, const char *));
extern void cpp_assert PARAMS ((cpp_reader *, const char *));
extern void cpp_undef PARAMS ((cpp_reader *, const char *));
OpenPOWER on IntegriCloud