c-lex.c (remember_protocol_qualifiers): Handle RID_BYREF.
* c-lex.c (remember_protocol_qualifiers): Handle RID_BYREF. (init_lex): Initialize ridpointers[RID_BYREF]. * c-lex.h (enum rid): Add RID_BYREF. * c-parse.gperf: Add RID_BYREF as a type qualifier. * objc/objc-act.c (is_objc_type_qualifiers): Handle RID_BYREF. (encode_type_qualifiers): Similarly * c-gperf.h: Rebuilt. From-SVN: r22918
This commit is contained in:
parent
1df287f8fb
commit
f1488abaa3
@ -1,3 +1,13 @@
|
||||
Thu Oct 8 12:21:14 1998 Richard Frith-Macdonald <richard@brainstorm.co.uk>
|
||||
|
||||
* c-lex.c (remember_protocol_qualifiers): Handle RID_BYREF.
|
||||
(init_lex): Initialize ridpointers[RID_BYREF].
|
||||
* c-lex.h (enum rid): Add RID_BYREF.
|
||||
* c-parse.gperf: Add RID_BYREF as a type qualifier.
|
||||
* objc/objc-act.c (is_objc_type_qualifiers): Handle RID_BYREF.
|
||||
(encode_type_qualifiers): Similarly
|
||||
* c-gperf.h: Rebuilt.
|
||||
|
||||
Thu Oct 8 05:56:00 1998 Jeffrey A Law (law@cygnus.com)
|
||||
|
||||
* c-common.c (type_for_mode): Only return TItype nodes when
|
||||
|
215
gcc/c-gperf.h
215
gcc/c-gperf.h
@ -1,14 +1,14 @@
|
||||
/* KR-C code produced by gperf version 2.7.1 (19981006 egcs) */
|
||||
/* Command-line: gperf -L KR-C -F , 0, 0 -p -j1 -i 1 -g -o -t -G -N is_reserved_word -k1,3,$ ./c-parse.gperf */
|
||||
/* Command-line: gperf -L KR-C -F , 0, 0 -p -j1 -i 1 -g -o -t -G -N is_reserved_word -k1,3,$ /hurl/puke/law/egcs/egcs/gcc/c-parse.gperf */
|
||||
/* Command-line: gperf -L KR-C -F ', 0, 0' -p -j1 -i 1 -g -o -t -N is_reserved_word -k1,3,$ c-parse.gperf */
|
||||
struct resword { char *name; short token; enum rid rid; };
|
||||
|
||||
#define TOTAL_KEYWORDS 79
|
||||
#define TOTAL_KEYWORDS 80
|
||||
#define MIN_WORD_LENGTH 2
|
||||
#define MAX_WORD_LENGTH 20
|
||||
#define MIN_HASH_VALUE 10
|
||||
#define MAX_HASH_VALUE 144
|
||||
/* maximum key range = 135, duplicates = 0 */
|
||||
#define MAX_HASH_VALUE 162
|
||||
/* maximum key range = 153, duplicates = 0 */
|
||||
|
||||
#ifdef __GNUC__
|
||||
__inline
|
||||
@ -20,32 +20,32 @@ hash (str, len)
|
||||
{
|
||||
static unsigned char asso_values[] =
|
||||
{
|
||||
145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
|
||||
145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
|
||||
145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
|
||||
145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
|
||||
145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
|
||||
145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
|
||||
145, 145, 145, 145, 25, 145, 145, 145, 145, 145,
|
||||
145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
|
||||
145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
|
||||
145, 145, 145, 145, 145, 1, 145, 46, 8, 15,
|
||||
61, 6, 36, 48, 3, 5, 145, 18, 63, 25,
|
||||
29, 76, 1, 145, 13, 2, 1, 51, 37, 9,
|
||||
9, 1, 3, 145, 145, 145, 145, 145, 145, 145,
|
||||
145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
|
||||
145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
|
||||
145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
|
||||
145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
|
||||
145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
|
||||
145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
|
||||
145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
|
||||
145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
|
||||
145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
|
||||
145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
|
||||
145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
|
||||
145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
|
||||
145, 145, 145, 145, 145, 145
|
||||
163, 163, 163, 163, 163, 163, 163, 163, 163, 163,
|
||||
163, 163, 163, 163, 163, 163, 163, 163, 163, 163,
|
||||
163, 163, 163, 163, 163, 163, 163, 163, 163, 163,
|
||||
163, 163, 163, 163, 163, 163, 163, 163, 163, 163,
|
||||
163, 163, 163, 163, 163, 163, 163, 163, 163, 163,
|
||||
163, 163, 163, 163, 163, 163, 163, 163, 163, 163,
|
||||
163, 163, 163, 163, 8, 163, 163, 163, 163, 163,
|
||||
163, 163, 163, 163, 163, 163, 163, 163, 163, 163,
|
||||
163, 163, 163, 163, 163, 163, 163, 163, 163, 163,
|
||||
163, 163, 163, 163, 163, 1, 163, 24, 8, 61,
|
||||
37, 6, 47, 49, 2, 5, 163, 3, 51, 30,
|
||||
58, 91, 35, 163, 33, 13, 1, 18, 49, 2,
|
||||
2, 5, 3, 163, 163, 163, 163, 163, 163, 163,
|
||||
163, 163, 163, 163, 163, 163, 163, 163, 163, 163,
|
||||
163, 163, 163, 163, 163, 163, 163, 163, 163, 163,
|
||||
163, 163, 163, 163, 163, 163, 163, 163, 163, 163,
|
||||
163, 163, 163, 163, 163, 163, 163, 163, 163, 163,
|
||||
163, 163, 163, 163, 163, 163, 163, 163, 163, 163,
|
||||
163, 163, 163, 163, 163, 163, 163, 163, 163, 163,
|
||||
163, 163, 163, 163, 163, 163, 163, 163, 163, 163,
|
||||
163, 163, 163, 163, 163, 163, 163, 163, 163, 163,
|
||||
163, 163, 163, 163, 163, 163, 163, 163, 163, 163,
|
||||
163, 163, 163, 163, 163, 163, 163, 163, 163, 163,
|
||||
163, 163, 163, 163, 163, 163, 163, 163, 163, 163,
|
||||
163, 163, 163, 163, 163, 163, 163, 163, 163, 163,
|
||||
163, 163, 163, 163, 163, 163
|
||||
};
|
||||
register int hval = len;
|
||||
|
||||
@ -69,109 +69,114 @@ static struct resword wordlist[] =
|
||||
{"int", TYPESPEC, RID_INT},
|
||||
{"", 0, 0}, {"", 0, 0},
|
||||
{"__typeof__", TYPEOF, NORID},
|
||||
{"__signed__", TYPESPEC, RID_SIGNED},
|
||||
{"", 0, 0},
|
||||
{"__imag__", IMAGPART, NORID},
|
||||
{"switch", SWITCH, NORID},
|
||||
{"", 0, 0},
|
||||
{"__inline__", SCSPEC, RID_INLINE},
|
||||
{"else", ELSE, NORID},
|
||||
{"while", WHILE, NORID},
|
||||
{"__iterator__", SCSPEC, RID_ITERATOR},
|
||||
{"__inline", SCSPEC, RID_INLINE},
|
||||
{"__extension__", EXTENSION, NORID},
|
||||
{"struct", STRUCT, NORID},
|
||||
{"__real__", REALPART, NORID},
|
||||
{"__const", TYPE_QUAL, RID_CONST},
|
||||
{"while", WHILE, NORID},
|
||||
{"__const__", TYPE_QUAL, RID_CONST},
|
||||
{"case", CASE, NORID},
|
||||
{"__complex__", TYPESPEC, RID_COMPLEX},
|
||||
{"__iterator", SCSPEC, RID_ITERATOR},
|
||||
{"bycopy", TYPE_QUAL, RID_BYCOPY},
|
||||
{"", 0, 0}, {"", 0, 0}, {"", 0, 0},
|
||||
{"__complex", TYPESPEC, RID_COMPLEX},
|
||||
{"", 0, 0},
|
||||
{"in", TYPE_QUAL, RID_IN},
|
||||
{"break", BREAK, NORID},
|
||||
{"@defs", DEFS, NORID},
|
||||
{"", 0, 0}, {"", 0, 0}, {"", 0, 0},
|
||||
{"extern", SCSPEC, RID_EXTERN},
|
||||
{"if", IF, NORID},
|
||||
{"typeof", TYPEOF, NORID},
|
||||
{"typedef", SCSPEC, RID_TYPEDEF},
|
||||
{"__typeof", TYPEOF, NORID},
|
||||
{"sizeof", SIZEOF, NORID},
|
||||
{"", 0, 0},
|
||||
{"return", RETURN, NORID},
|
||||
{"const", TYPE_QUAL, RID_CONST},
|
||||
{"__volatile__", TYPE_QUAL, RID_VOLATILE},
|
||||
{"@private", PRIVATE, NORID},
|
||||
{"@selector", SELECTOR, NORID},
|
||||
{"__volatile", TYPE_QUAL, RID_VOLATILE},
|
||||
{"__asm__", ASM_KEYWORD, NORID},
|
||||
{"", 0, 0}, {"", 0, 0},
|
||||
{"continue", CONTINUE, NORID},
|
||||
{"__signed__", TYPESPEC, RID_SIGNED},
|
||||
{"switch", SWITCH, NORID},
|
||||
{"", 0, 0}, {"", 0, 0},
|
||||
{"else", ELSE, NORID},
|
||||
{"", 0, 0}, {"", 0, 0},
|
||||
{"@defs", DEFS, NORID},
|
||||
{"__asm__", ASM_KEYWORD, NORID},
|
||||
{"", 0, 0}, {"", 0, 0}, {"", 0, 0},
|
||||
{"__alignof__", ALIGNOF, NORID},
|
||||
{"__imag", IMAGPART, NORID},
|
||||
{"", 0, 0},
|
||||
{"__attribute__", ATTRIBUTE, NORID},
|
||||
{"", 0, 0}, {"", 0, 0},
|
||||
{"__attribute", ATTRIBUTE, NORID},
|
||||
{"for", FOR, NORID},
|
||||
{"", 0, 0},
|
||||
{"@encode", ENCODE, NORID},
|
||||
{"__real__", REALPART, NORID},
|
||||
{"id", OBJECTNAME, RID_ID},
|
||||
{"static", SCSPEC, RID_STATIC},
|
||||
{"@interface", INTERFACE, NORID},
|
||||
{"", 0, 0},
|
||||
{"__signed", TYPESPEC, RID_SIGNED},
|
||||
{"", 0, 0},
|
||||
{"__label__", LABEL, NORID},
|
||||
{"", 0, 0}, {"", 0, 0},
|
||||
{"__asm", ASM_KEYWORD, NORID},
|
||||
{"char", TYPESPEC, RID_CHAR},
|
||||
{"", 0, 0},
|
||||
{"inline", SCSPEC, RID_INLINE},
|
||||
{"out", TYPE_QUAL, RID_OUT},
|
||||
{"register", SCSPEC, RID_REGISTER},
|
||||
{"__real", REALPART, NORID},
|
||||
{"short", TYPESPEC, RID_SHORT},
|
||||
{"", 0, 0},
|
||||
{"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
|
||||
{"__iterator", SCSPEC, RID_ITERATOR},
|
||||
{"", 0, 0}, {"", 0, 0}, {"", 0, 0},
|
||||
{"struct", STRUCT, NORID},
|
||||
{"if", IF, NORID},
|
||||
{"@private", PRIVATE, NORID},
|
||||
{"@selector", SELECTOR, NORID},
|
||||
{"__typeof", TYPEOF, NORID},
|
||||
{"enum", ENUM, NORID},
|
||||
{"inout", TYPE_QUAL, RID_INOUT},
|
||||
{"__signed", TYPESPEC, RID_SIGNED},
|
||||
{"__asm", ASM_KEYWORD, NORID},
|
||||
{"__imag", IMAGPART, NORID},
|
||||
{"__label__", LABEL, NORID},
|
||||
{"__volatile__", TYPE_QUAL, RID_VOLATILE},
|
||||
{"", 0, 0},
|
||||
{"oneway", TYPE_QUAL, RID_ONEWAY},
|
||||
{"union", UNION, NORID},
|
||||
{"in", TYPE_QUAL, RID_IN},
|
||||
{"__volatile", TYPE_QUAL, RID_VOLATILE},
|
||||
{"double", TYPESPEC, RID_DOUBLE},
|
||||
{"inline", SCSPEC, RID_INLINE},
|
||||
{"sizeof", SIZEOF, NORID},
|
||||
{"__const", TYPE_QUAL, RID_CONST},
|
||||
{"extern", SCSPEC, RID_EXTERN},
|
||||
{"__const__", TYPE_QUAL, RID_CONST},
|
||||
{"__complex", TYPESPEC, RID_COMPLEX},
|
||||
{"__complex__", TYPESPEC, RID_COMPLEX},
|
||||
{"", 0, 0},
|
||||
{"__alignof", ALIGNOF, NORID},
|
||||
{"", 0, 0},
|
||||
{"@implementation", IMPLEMENTATION, NORID},
|
||||
{"unsigned", TYPESPEC, RID_UNSIGNED},
|
||||
{"", 0, 0},
|
||||
{"@class", CLASS, NORID},
|
||||
{"@encode", ENCODE, NORID},
|
||||
{"bycopy", TYPE_QUAL, RID_BYCOPY},
|
||||
{"__alignof", ALIGNOF, NORID},
|
||||
{"@interface", INTERFACE, NORID},
|
||||
{"", 0, 0},
|
||||
{"@public", PUBLIC, NORID},
|
||||
{"case", CASE, NORID},
|
||||
{"", 0, 0},
|
||||
{"union", UNION, NORID},
|
||||
{"asm", ASM_KEYWORD, NORID},
|
||||
{"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
|
||||
{"default", DEFAULT, NORID},
|
||||
{"", 0, 0},
|
||||
{"void", TYPESPEC, RID_VOID},
|
||||
{"", 0, 0},
|
||||
{"@protected", PROTECTED, NORID},
|
||||
{"typeof", TYPEOF, NORID},
|
||||
{"typedef", SCSPEC, RID_TYPEDEF},
|
||||
{"__real", REALPART, NORID},
|
||||
{"default", DEFAULT, NORID},
|
||||
{"byref", TYPE_QUAL, RID_BYREF},
|
||||
{"@public", PUBLIC, NORID},
|
||||
{"void", TYPESPEC, RID_VOID},
|
||||
{"out", TYPE_QUAL, RID_OUT},
|
||||
{"", 0, 0},
|
||||
{"return", RETURN, NORID},
|
||||
{"", 0, 0}, {"", 0, 0},
|
||||
{"@protocol", PROTOCOL, NORID},
|
||||
{"", 0, 0}, {"", 0, 0}, {"", 0, 0},
|
||||
{"volatile", TYPE_QUAL, RID_VOLATILE},
|
||||
{"", 0, 0}, {"", 0, 0},
|
||||
{"inout", TYPE_QUAL, RID_INOUT},
|
||||
{"", 0, 0},
|
||||
{"static", SCSPEC, RID_STATIC},
|
||||
{"signed", TYPESPEC, RID_SIGNED},
|
||||
{"float", TYPESPEC, RID_FLOAT},
|
||||
{"", 0, 0},
|
||||
{"@end", END, NORID},
|
||||
{"oneway", TYPE_QUAL, RID_ONEWAY},
|
||||
{"", 0, 0},
|
||||
{"short", TYPESPEC, RID_SHORT},
|
||||
{"@implementation", IMPLEMENTATION, NORID},
|
||||
{"", 0, 0}, {"", 0, 0},
|
||||
{"unsigned", TYPESPEC, RID_UNSIGNED},
|
||||
{"@compatibility_alias", ALIAS, NORID},
|
||||
{"double", TYPESPEC, RID_DOUBLE},
|
||||
{"", 0, 0}, {"", 0, 0},
|
||||
{"volatile", TYPE_QUAL, RID_VOLATILE},
|
||||
{"", 0, 0},
|
||||
{"for", FOR, NORID},
|
||||
{"", 0, 0}, {"", 0, 0}, {"", 0, 0},
|
||||
{"auto", SCSPEC, RID_AUTO},
|
||||
{"", 0, 0},
|
||||
{"char", TYPESPEC, RID_CHAR},
|
||||
{"register", SCSPEC, RID_REGISTER},
|
||||
{"", 0, 0},
|
||||
{"const", TYPE_QUAL, RID_CONST},
|
||||
{"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
|
||||
{"do", DO, NORID},
|
||||
{"", 0, 0},
|
||||
{"@compatibility_alias", ALIAS, NORID},
|
||||
{"continue", CONTINUE, NORID},
|
||||
{"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
|
||||
{"", 0, 0},
|
||||
{"float", TYPESPEC, RID_FLOAT},
|
||||
{"goto", GOTO, NORID},
|
||||
{"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
|
||||
{"do", DO, NORID},
|
||||
{"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
|
||||
{"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
|
||||
{"long", TYPESPEC, RID_LONG}
|
||||
};
|
||||
|
||||
|
@ -164,6 +164,8 @@ remember_protocol_qualifiers ()
|
||||
wordlist[i].name = "inout";
|
||||
else if (wordlist[i].rid == RID_BYCOPY)
|
||||
wordlist[i].name = "bycopy";
|
||||
else if (wordlist[i].rid == RID_BYREF)
|
||||
wordlist[i].name = "byref";
|
||||
else if (wordlist[i].rid == RID_ONEWAY)
|
||||
wordlist[i].name = "oneway";
|
||||
}
|
||||
@ -256,6 +258,7 @@ init_lex ()
|
||||
ridpointers[(int) RID_OUT] = get_identifier ("out");
|
||||
ridpointers[(int) RID_INOUT] = get_identifier ("inout");
|
||||
ridpointers[(int) RID_BYCOPY] = get_identifier ("bycopy");
|
||||
ridpointers[(int) RID_BYREF] = get_identifier ("byref");
|
||||
ridpointers[(int) RID_ONEWAY] = get_identifier ("oneway");
|
||||
forget_protocol_qualifiers();
|
||||
|
||||
|
@ -50,6 +50,7 @@ enum rid
|
||||
RID_OUT,
|
||||
RID_INOUT,
|
||||
RID_BYCOPY,
|
||||
RID_BYREF,
|
||||
RID_ONEWAY,
|
||||
RID_ID,
|
||||
|
||||
|
@ -45,6 +45,7 @@ asm, ASM_KEYWORD, NORID
|
||||
auto, SCSPEC, RID_AUTO
|
||||
break, BREAK, NORID
|
||||
bycopy, TYPE_QUAL, RID_BYCOPY
|
||||
byref, TYPE_QUAL, RID_BYREF
|
||||
case, CASE, NORID
|
||||
char, TYPESPEC, RID_CHAR
|
||||
const, TYPE_QUAL, RID_CONST
|
||||
|
@ -4610,6 +4610,7 @@ is_objc_type_qualifier (node)
|
||||
|| node == ridpointers [(int) RID_OUT]
|
||||
|| node == ridpointers [(int) RID_INOUT]
|
||||
|| node == ridpointers [(int) RID_BYCOPY]
|
||||
|| node == ridpointers [(int) RID_BYREF]
|
||||
|| node == ridpointers [(int) RID_ONEWAY]));
|
||||
}
|
||||
|
||||
@ -6495,6 +6496,8 @@ encode_type_qualifiers (declspecs)
|
||||
obstack_1grow (&util_obstack, 'o');
|
||||
else if (ridpointers[(int) RID_BYCOPY] == TREE_VALUE (spec))
|
||||
obstack_1grow (&util_obstack, 'O');
|
||||
else if (ridpointers[(int) RID_BYREF] == TREE_VALUE (spec))
|
||||
obstack_1grow (&util_obstack, 'R');
|
||||
else if (ridpointers[(int) RID_ONEWAY] == TREE_VALUE (spec))
|
||||
obstack_1grow (&util_obstack, 'V');
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user