aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog10
-rw-r--r--gcc/c-gperf.h203
-rw-r--r--gcc/c-lex.c3
-rw-r--r--gcc/c-lex.h1
-rw-r--r--gcc/c-parse.gperf1
-rw-r--r--gcc/objc/objc-act.c3
6 files changed, 122 insertions, 99 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index fc93b6db84b..195a2646f27 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/c-gperf.h b/gcc/c-gperf.h
index 2932feb6cc8..41b8d0fe82a 100644
--- a/gcc/c-gperf.h
+++ b/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},
+ {"", 0, 0}, {"", 0, 0},
+ {"__signed__", TYPESPEC, RID_SIGNED},
+ {"switch", SWITCH, NORID},
+ {"", 0, 0}, {"", 0, 0},
+ {"else", ELSE, NORID},
+ {"", 0, 0}, {"", 0, 0},
{"@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},
+ {"", 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},
+ {"", 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},
{"__signed", TYPESPEC, RID_SIGNED},
- {"", 0, 0},
- {"__label__", LABEL, NORID},
- {"", 0, 0}, {"", 0, 0},
{"__asm", ASM_KEYWORD, NORID},
- {"char", TYPESPEC, RID_CHAR},
+ {"__imag", IMAGPART, NORID},
+ {"__label__", LABEL, NORID},
+ {"__volatile__", TYPE_QUAL, RID_VOLATILE},
{"", 0, 0},
+ {"in", TYPE_QUAL, RID_IN},
+ {"__volatile", TYPE_QUAL, RID_VOLATILE},
+ {"double", TYPESPEC, RID_DOUBLE},
{"inline", SCSPEC, RID_INLINE},
- {"out", TYPE_QUAL, RID_OUT},
- {"register", SCSPEC, RID_REGISTER},
- {"__real", REALPART, NORID},
- {"short", TYPESPEC, RID_SHORT},
- {"", 0, 0},
- {"enum", ENUM, NORID},
- {"inout", TYPE_QUAL, RID_INOUT},
+ {"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},
- {"oneway", TYPE_QUAL, RID_ONEWAY},
- {"union", UNION, 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},
- {"@implementation", IMPLEMENTATION, NORID},
- {"", 0, 0},
- {"@class", CLASS, NORID},
+ {"case", CASE, NORID},
{"", 0, 0},
- {"@public", PUBLIC, NORID},
+ {"union", UNION, NORID},
{"asm", ASM_KEYWORD, NORID},
- {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
+ {"@protected", PROTECTED, NORID},
+ {"typeof", TYPEOF, NORID},
+ {"typedef", SCSPEC, RID_TYPEDEF},
+ {"__real", REALPART, NORID},
{"default", DEFAULT, NORID},
- {"", 0, 0},
+ {"byref", TYPE_QUAL, RID_BYREF},
+ {"@public", PUBLIC, NORID},
{"void", TYPESPEC, RID_VOID},
+ {"out", TYPE_QUAL, RID_OUT},
{"", 0, 0},
- {"@protected", PROTECTED, NORID},
- {"@protocol", PROTOCOL, NORID},
- {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
- {"volatile", TYPE_QUAL, RID_VOLATILE},
+ {"return", RETURN, NORID},
{"", 0, 0}, {"", 0, 0},
+ {"@protocol", PROTOCOL, NORID},
+ {"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}
};
diff --git a/gcc/c-lex.c b/gcc/c-lex.c
index af627cd5315..6e56a3f448a 100644
--- a/gcc/c-lex.c
+++ b/gcc/c-lex.c
@@ -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();
diff --git a/gcc/c-lex.h b/gcc/c-lex.h
index bd0b9d4b91f..0ffc6a40c56 100644
--- a/gcc/c-lex.h
+++ b/gcc/c-lex.h
@@ -50,6 +50,7 @@ enum rid
RID_OUT,
RID_INOUT,
RID_BYCOPY,
+ RID_BYREF,
RID_ONEWAY,
RID_ID,
diff --git a/gcc/c-parse.gperf b/gcc/c-parse.gperf
index 017dcb5497e..3ce33a4595a 100644
--- a/gcc/c-parse.gperf
+++ b/gcc/c-parse.gperf
@@ -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
diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c
index 0dc5ef05398..94c10bcd229 100644
--- a/gcc/objc/objc-act.c
+++ b/gcc/objc/objc-act.c
@@ -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');
}