diff options
author | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-04-30 01:34:00 +0000 |
---|---|---|
committer | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-04-30 01:34:00 +0000 |
commit | 230b24b7f59b92dad9abcc93fbc29eecfb394982 (patch) | |
tree | 9695b447d0767996981375b00e5448cb208e44e6 /gcc/cpphash.h | |
parent | 0719aa783b8928226672756c8e762565411964e3 (diff) | |
download | gcc-230b24b7f59b92dad9abcc93fbc29eecfb394982.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33538 138bc75d-0d04-0410-961f-82ee72b054a4
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 498dee5b83d..edb61f74e53 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. */ |