diff options
author | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-03-02 00:40:00 +0000 |
---|---|---|
committer | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-03-02 00:40:00 +0000 |
commit | e2df8b814aafe37e171cc5138766b2b5f7a16dfe (patch) | |
tree | b9429823f84096cf8932b11e6e31c6dd708dab5d /gcc/c-parse.in | |
parent | d76c69d6ff32d648543145cc819184dddb27b439 (diff) | |
download | gcc-e2df8b814aafe37e171cc5138766b2b5f7a16dfe.tar.gz |
* stringpool.c (set_identifier): New function.
* tree.h: Prototype it.
* c-parse.in: Kill D_YES. If compiled for objc, call
save_and_forget_protocol_qualifiers from init_reswords.
* objc/objc-act.c (remember_protocol_qualifiers,
forget_protocol_qualifiers): Don't diddle C_IS_RESERVED_WORD.
Swap out the non-keyword IDENTIFIER_NODEs for keyword ones, or
vice versa.
(save_and_forget_protocol_qualifiers): New function.
* c-lex.h: Prototype save_and_forget_protocol_qualifiers.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@40170 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-parse.in')
-rw-r--r-- | gcc/c-parse.in | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/gcc/c-parse.in b/gcc/c-parse.in index 4f1de58772c..ea59e739dd3 100644 --- a/gcc/c-parse.in +++ b/gcc/c-parse.in @@ -2878,7 +2878,6 @@ struct resword #define D_EXT 0x04 /* GCC extension */ #define D_EXT89 0x08 /* GCC extension incorporated in C99 */ #define D_OBJC 0x10 /* Objective C only */ -#define D_YES 0x20 /* always starts disabled */ static const struct resword reswords[] = { @@ -2971,12 +2970,12 @@ ifobjc { "@public", RID_AT_PUBLIC, D_OBJC }, { "@selector", RID_AT_SELECTOR, D_OBJC }, { "id", RID_ID, D_OBJC }, - { "bycopy", RID_BYCOPY, D_OBJC|D_YES }, - { "byref", RID_BYREF, D_OBJC|D_YES }, - { "in", RID_IN, D_OBJC|D_YES }, - { "inout", RID_INOUT, D_OBJC|D_YES }, - { "oneway", RID_ONEWAY, D_OBJC|D_YES }, - { "out", RID_OUT, D_OBJC|D_YES }, + { "bycopy", RID_BYCOPY, D_OBJC }, + { "byref", RID_BYREF, D_OBJC }, + { "in", RID_IN, D_OBJC }, + { "inout", RID_INOUT, D_OBJC }, + { "oneway", RID_ONEWAY, D_OBJC }, + { "out", RID_OUT, D_OBJC }, end ifobjc }; #define N_reswords (sizeof reswords / sizeof (struct resword)) @@ -3138,14 +3137,12 @@ init_reswords () id = get_identifier (reswords[i].word); C_RID_CODE (id) = reswords[i].rid; + C_IS_RESERVED_WORD (id) = 1; ridpointers [(int) reswords[i].rid] = id; - - /* Objective C does tricky things with enabling and disabling - keywords. So these we must not elide in the test above, but - wait and not mark them reserved now. */ - if (! (reswords[i].disable & D_YES)) - C_IS_RESERVED_WORD (id) = 1; } +ifobjc + save_and_forget_protocol_qualifiers (); +end ifobjc } const char * |