summaryrefslogtreecommitdiff
path: root/gcc/cpphash.h
diff options
context:
space:
mode:
authorzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>1999-02-08 20:27:27 +0000
committerzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>1999-02-08 20:27:27 +0000
commit963e5f16de1a3f9a79b4a5949626f83868e513a0 (patch)
treec079b4e9cc9eae1f223a405bc08b6a1cd358fb74 /gcc/cpphash.h
parentad215e603877fbc4248417d6ff2355b50a05b9d4 (diff)
downloadgcc-963e5f16de1a3f9a79b4a5949626f83868e513a0.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@25097 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cpphash.h')
-rw-r--r--gcc/cpphash.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/gcc/cpphash.h b/gcc/cpphash.h
index 0f37b56377d..28271f7e396 100644
--- a/gcc/cpphash.h
+++ b/gcc/cpphash.h
@@ -16,12 +16,12 @@ along with this program; if not, write to the Free Software
Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* different kinds of things that can appear in the value field
- of a hash node. Actually, this may be useless now. */
-union hashval {
- int ival;
- char *cpval;
- DEFINITION *defn;
- struct hashnode *aschain; /* for #assert */
+ of a hash node. */
+union hashval
+{
+ const char *cpval; /* some predefined macros */
+ DEFINITION *defn; /* #define */
+ struct hashnode *aschain; /* #assert */
};
struct hashnode {
@@ -49,6 +49,7 @@ typedef struct hashnode HASHNODE;
#define HASHSTEP(old, c) ((old << 2) + c)
#define MAKE_POS(v) (v & 0x7fffffff) /* make number positive */
-extern HASHNODE *install PARAMS ((U_CHAR *,int,enum node_type, int,char *,int));
+extern HASHNODE *install PARAMS ((U_CHAR *, int, enum node_type,
+ const char *, int));
extern int hashf PARAMS ((const U_CHAR *, int, int));
extern void delete_macro PARAMS ((HASHNODE *));