diff options
author | Zack Weinberg <zack@wolery.cumb.org> | 2000-04-30 01:34:00 +0000 |
---|---|---|
committer | Zack Weinberg <zack@gcc.gnu.org> | 2000-04-30 01:34:00 +0000 |
commit | d2158690aee47faf2cbe7199305abd626c4df488 (patch) | |
tree | 9695b447d0767996981375b00e5448cb208e44e6 /gcc/cpphash.h | |
parent | 10d1117cbc74ea64d22bbe75fb5f305a5d8948c1 (diff) | |
download | gcc-d2158690aee47faf2cbe7199305abd626c4df488.zip gcc-d2158690aee47faf2cbe7199305abd626c4df488.tar.gz gcc-d2158690aee47faf2cbe7199305abd626c4df488.tar.bz2 |
cpphash.h (enum node_type): Take out T_MCONST.
* cpphash.h (enum node_type: Take out T_MCONST.
(union hashval): Move into struct hashnode.
(struct hashnode): Pack tighter. Remove file, line, col
members.
* cpphash.c: Constify most of the macro-definition structures.
(struct definition): Replace by struct object_defn
and struct funct_defn. Put file, line, column information
here. All users updated to match.
(_cpp_create_definition, _cpp_macroexpand): Remove special
case for #define WORD OTHERWORD.
* cpplib.c (do_undef): Remove T_MCONST case.
From-SVN: r33538
Diffstat (limited to 'gcc/cpphash.h')
-rw-r--r-- | gcc/cpphash.h | 37 |
1 files changed, 15 insertions, 22 deletions
diff --git a/gcc/cpphash.h b/gcc/cpphash.h index 498dee5..edb61f7 100644 --- a/gcc/cpphash.h +++ b/gcc/cpphash.h @@ -45,35 +45,28 @@ enum node_type T_CONST, /* Constant string, used by `__SIZE_TYPE__' etc */ T_XCONST, /* Ditto, but the string is malloced memory */ T_POISON, /* poisoned identifier */ - T_MCONST, /* object-like macro defined to a single identifier */ - T_MACRO, /* general object-like macro */ - T_FMACRO, /* general function-like macro */ + T_MACRO, /* object-like macro */ + T_FMACRO, /* function-like macro */ T_IDENTITY, /* macro defined to itself */ T_EMPTY /* macro defined to nothing */ }; -/* different kinds of things that can appear in the value field - of a hash node. */ -union hashval -{ - const char *cpval; /* some predefined macros */ - struct definition *defn; /* #define */ - struct hashnode *aschain; /* #assert */ -}; - typedef struct hashnode HASHNODE; struct hashnode { - const U_CHAR *name; /* the actual name */ - size_t length; /* length of token, for quick comparison */ - unsigned long hash; /* cached hash value */ - union hashval value; /* pointer to expansion, or whatever */ - enum node_type type; /* type of special token */ - int disabled; /* macro turned off for rescan? */ - - const char *file; /* File, line, column of definition; */ - int line; - int col; + unsigned int hash; /* cached hash value */ + unsigned short length; /* length of name */ + ENUM_BITFIELD(node_type) type : 8; /* node type */ + char disabled; /* macro turned off for rescan? */ + + union { + const char *cpval; /* some predefined macros */ + const struct object_defn *odefn; /* #define foo bar */ + const struct funct_defn *fdefn; /* #define foo(x) bar(x) */ + struct hashnode *aschain; /* #assert */ + } value; + + const U_CHAR *name; }; /* List of directories to look for include files in. */ |