diff options
author | Zack Weinberg <zack@gcc.gnu.org> | 2000-04-23 17:03:31 +0000 |
---|---|---|
committer | Zack Weinberg <zack@gcc.gnu.org> | 2000-04-23 17:03:31 +0000 |
commit | d9e0bd53b2da36f66fcd18b168b354612ef7f4df (patch) | |
tree | dce0dfebe9bc09562c88a4bc2be4eecd8f6147d6 /gcc/cppinit.c | |
parent | 3c8c10b8c691cd1f8111f4eaf50ff22beadc0088 (diff) | |
download | gcc-d9e0bd53b2da36f66fcd18b168b354612ef7f4df.zip gcc-d9e0bd53b2da36f66fcd18b168b354612ef7f4df.tar.gz gcc-d9e0bd53b2da36f66fcd18b168b354612ef7f4df.tar.bz2 |
cpphash.h (struct definition): Move file, line, col members...
* cpphash.h (struct definition): Move file, line, col members...
(struct hashnode): ... here. Also add 'disabled' flag.
(enum node_type): Add T_VOID, T_XCONST, T_FMACRO, and
T_IDENTITY. Remove T_DISABLED.
Update prototypes.
* cpphash.c (_cpp_dump_definition): Split out dump_DEFINITION.
(collect_expansion): Split into collect_objlike_expansion and
collect_funlike_expansion.
(_cpp_macroexpand): Split out scan_arguments, stringify, and
funlike_macroexpand.
(_cpp_compare_defs): Rename compare_defs, make static.
(_cpp_make_hashnode): Initialize hp->disabled.
(macro_cleanup): Adjust for new token types. Clear
m->disabled.
(_cpp_create_definition): Move code here to determine what
sort of macro it is, and code to check for redefinitions, from
do_define. Implement a few simple cases without creating a
full DEFINITION.
(_cpp_macroexpand, special_symbol, _cpp_dump_definition):
Handle the simple cases.
(push_macro_expansion): Set buf->has_escapes and hp->disabled
here.
* cppinit.c (builtin_array): Change MCONST to XCONST
everywhere.
* cpplex.c (maybe_macroexpand): Handle IDENTITY macros here;
fix check for disabled and function-like macros.
* cpplib.c (do_define): Move most logic to
_cpp_create_definition.
(do_undef): Handle new special token types.
From-SVN: r33355
Diffstat (limited to 'gcc/cppinit.c')
-rw-r--r-- | gcc/cppinit.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cppinit.c b/gcc/cppinit.c index d1e7c11..957e611 100644 --- a/gcc/cppinit.c +++ b/gcc/cppinit.c @@ -635,7 +635,7 @@ static const struct builtin builtin_array[] = { "__LINE__", 0, T_SPECLINE, 0 }, { "__INCLUDE_LEVEL__", 0, T_INCLUDE_LEVEL, 0 }, - { "__VERSION__", 0, T_MCONST, DUMP|VERS }, + { "__VERSION__", 0, T_XCONST, DUMP|VERS }, { "__USER_LABEL_PREFIX__", 0, T_CONST, DUMP|ULP }, { "__STDC__", "1", T_STDC, DUMP }, { "__REGISTER_PREFIX__", REGISTER_PREFIX, T_CONST, DUMP }, |