summaryrefslogtreecommitdiff
path: root/gcc/cpphash.h
diff options
context:
space:
mode:
authorZack Weinberg <zack@wolery.cumb.org>2000-07-18 23:25:06 +0000
committerZack Weinberg <zack@gcc.gnu.org>2000-07-18 23:25:06 +0000
commit96be6998336d305447f3963eb2c9d902eae516a7 (patch)
treebe6672085587ff8d9d75f630009b64878dc2aec5 /gcc/cpphash.h
parentd0089985e7e6ec8fd020e40eb59667a88d0282de (diff)
downloadgcc-96be6998336d305447f3963eb2c9d902eae516a7.tar.gz
cpplib.h (TTYPE_TABLE): Rearrange to use only two per-entry macros, not five.
* cpplib.h (TTYPE_TABLE): Rearrange to use only two per-entry macros, not five. * cpphash.h (TOKEN_NAME): New macro. (_cpp_spell_operator): Deleted. (token_spellings): Now _cpp_token_spellings. * cppexp.c: Use TOKEN_NAME or TYPE_NAME, not _cpp_spell_operator. * cpplex.c: Use OP and TK macros when expanding the TTYPE_TABLE. Eliminate token_names. For non-OPERATOR tokens, store the stringification of the enumeration name (CPP_CHAR, etc.) in the name slot of token_spellings. Use TOKEN_NAME and/or TOKEN_SPELL, do not reference token_spellings directly. * cpplib.c: Use TOKEN_SPELL. * cpplex.c (_cpp_push_token): If the token being pushed back is the previous token in this context, just subtract one from context->posn. * cppmacro.c (save_expansion): Clear aux field when storing a placemarker. * gcc.dg/cpp/paste5.c: New test. * gcc.dg/cpp/vararg1.c: New test. From-SVN: r35124
Diffstat (limited to 'gcc/cpphash.h')
-rw-r--r--gcc/cpphash.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/cpphash.h b/gcc/cpphash.h
index 98fcbb67ecf..51f7787e454 100644
--- a/gcc/cpphash.h
+++ b/gcc/cpphash.h
@@ -38,12 +38,13 @@ enum spell_type
struct token_spelling
{
- ENUM_BITFIELD(spell_type) type : CHAR_BIT;
- const U_CHAR *spelling;
+ enum spell_type category;
+ const U_CHAR *name;
};
-extern const struct token_spelling token_spellings[];
-#define TOKEN_SPELL(token) (token_spellings[(token)->type].type)
+extern const struct token_spelling _cpp_token_spellings[];
+#define TOKEN_SPELL(token) (_cpp_token_spellings[(token)->type].category)
+#define TOKEN_NAME(token) (_cpp_token_spellings[(token)->type].name)
/* Chained list of answers to an assertion. */
struct answer
@@ -267,7 +268,6 @@ extern const cpp_token *_cpp_get_token PARAMS ((cpp_reader *));
extern const cpp_token *_cpp_get_raw_token PARAMS ((cpp_reader *));
extern void _cpp_push_token PARAMS ((cpp_reader *, const cpp_token*));
extern const cpp_token *_cpp_glue_header_name PARAMS ((cpp_reader *));
-extern const U_CHAR *_cpp_spell_operator PARAMS ((enum cpp_ttype));
/* In cpplib.c */
extern const struct directive *_cpp_check_directive