diff options
author | Zack Weinberg <zack@midnite.ec.rhno.columbia.edu> | 1999-02-08 20:27:27 +0000 |
---|---|---|
committer | Zack Weinberg <zack@gcc.gnu.org> | 1999-02-08 20:27:27 +0000 |
commit | 5dfa4da1309462fbefced93c213c28a5417eabdb (patch) | |
tree | c079b4e9cc9eae1f223a405bc08b6a1cd358fb74 /gcc/cpplib.h | |
parent | 1c6c21c8a84cd07a513ebbf13e18325ea1bb1f18 (diff) | |
download | gcc-5dfa4da1309462fbefced93c213c28a5417eabdb.zip gcc-5dfa4da1309462fbefced93c213c28a5417eabdb.tar.gz gcc-5dfa4da1309462fbefced93c213c28a5417eabdb.tar.bz2 |
cpplib.c (special_symbol): Rewrite.
1999-02-08 23:25 -0500 Zack Weinberg <zack@midnite.ec.rhno.columbia.edu>
* cpplib.c (special_symbol): Rewrite. Don't copy things
multiple times. Handle __STDC__ specially. T_CONST
indicates a constant /string/. Don't handle T_*_TYPE and
T_SPEC_DEFINED. Use cpp_buf_line_and_col instead of
adjust_position. Determine the file buffer only if needed.
(initialize_builtins): Handle __SIZE_TYPE__,
__PTRDIFF_TYPE__, __WCHAR_TYPE__, __USER_LABEL_PREFIX__, and
__REGISTER_PREFIX__ with T_CONST special hashtab entries.
Don't provide __OBJC__; the driver does that. Provide
__STDC_VERSION__, using T_CONST. Use T_STDC for
__STDC__. Give install the length of all symbols defined.
(eval_if_expression): Drop code to insert and remove the
"defined" special symbol.
* cpplib.h: Remove SELF_DIR_DUMMY (no longer used). Remove
T_*_TYPE and T_SPEC_DEFINED from enum node_type; add T_STDC.
* cpphash.c (install): Drop the `ivalue' parameter. Constify
the `value' parameter. All callers changed.
* cpphash.h (install): Change prototype to match.
(union hashval): Remove `ival' member.
* cppexp.c (cpp_lex): Handle `defined' here.
From-SVN: r25097
Diffstat (limited to 'gcc/cpplib.h')
-rw-r--r-- | gcc/cpplib.h | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/gcc/cpplib.h b/gcc/cpplib.h index bd2caf5..9572bb8 100644 --- a/gcc/cpplib.h +++ b/gcc/cpplib.h @@ -526,12 +526,7 @@ struct include_hash redundant_include_p */ char *buf, *limit; /* for file content cache, not yet implemented */ }; - -/* If a buffer's dir field is SELF_DIR_DUMMY, it means the file was found - via the same directory as the file that #included it. */ -#define SELF_DIR_DUMMY ((struct file_name_list *) (~0)) - /* Name under which this program was invoked. */ extern char *progname; @@ -570,16 +565,11 @@ enum node_type { T_BASE_FILE, /* `__BASE_FILE__' */ T_INCLUDE_LEVEL, /* `__INCLUDE_LEVEL__' */ T_VERSION, /* `__VERSION__' */ - T_SIZE_TYPE, /* `__SIZE_TYPE__' */ - T_PTRDIFF_TYPE, /* `__PTRDIFF_TYPE__' */ - T_WCHAR_TYPE, /* `__WCHAR_TYPE__' */ - T_USER_LABEL_PREFIX_TYPE, /* `__USER_LABEL_PREFIX__' */ - T_REGISTER_PREFIX_TYPE, /* `__REGISTER_PREFIX__' */ T_TIME, /* `__TIME__' */ - T_CONST, /* Constant value, used by `__STDC__' */ + T_STDC, /* `__STDC__' */ + T_CONST, /* Constant string, used by `__SIZE_TYPE__' etc */ T_MACRO, /* macro defined by `#define' */ T_DISABLED, /* macro temporarily turned off for rescan */ - T_SPEC_DEFINED, /* special `defined' macro for use in #if statements */ T_PCSTRING, /* precompiled string (hashval is KEYDEF *) */ T_UNUSED /* Used for something not defined. */ }; |