Commit db127392 by Kaveh R. Ghazi Committed by Kaveh Ghazi

Warning fixes:

        * Makefile.in (c-gperf.h): Add -L KR-C -F ', 0, 0' flags to gperf.
        (c-parse.gperf): Update comments describing invocation flags.
        (c-gperf.h): Regenerate using gperf 2.7.1 (19981006 egcs).

From-SVN: r22889
parent 9e46e5e8
Wed Oct 7 12:55:26 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Makefile.in (c-gperf.h): Add -L KR-C -F ', 0, 0' flags to gperf.
(c-parse.gperf): Update comments describing invocation flags.
(c-gperf.h): Regenerate using gperf 2.7.1 (19981006 egcs).
1998-10-07 Manfred Hollstein <manfred@s-direktnet.de> 1998-10-07 Manfred Hollstein <manfred@s-direktnet.de>
* reload1.c (reload): Call free before clobbering the memory * reload1.c (reload): Call free before clobbering the memory
......
...@@ -1265,8 +1265,8 @@ $(srcdir)/c-parse.y: c-parse.in ...@@ -1265,8 +1265,8 @@ $(srcdir)/c-parse.y: c-parse.in
$(srcdir)/move-if-change tmp-c-parse.y $(srcdir)/c-parse.y $(srcdir)/move-if-change tmp-c-parse.y $(srcdir)/c-parse.y
$(srcdir)/c-gperf.h: c-parse.gperf $(srcdir)/c-gperf.h: c-parse.gperf
gperf -p -j1 -i 1 -g -o -t -G -N is_reserved_word -k1,3,$$ \ gperf -L KR-C -F ', 0, 0' -p -j1 -i 1 -g -o -t -G -N is_reserved_word \
$(srcdir)/c-parse.gperf >tmp-gperf.h -k1,3,$$ $(srcdir)/c-parse.gperf >tmp-gperf.h
$(srcdir)/move-if-change tmp-gperf.h $(srcdir)/c-gperf.h $(srcdir)/move-if-change tmp-gperf.h $(srcdir)/c-gperf.h
c-decl.o : c-decl.c $(CONFIG_H) system.h $(TREE_H) c-tree.h c-lex.h flags.h \ c-decl.o : c-decl.c $(CONFIG_H) system.h $(TREE_H) c-tree.h c-lex.h flags.h \
......
/* C code produced by gperf version 2.5 (GNU C++ version) */ /* KR-C code produced by gperf version 2.7.1 (19981006 egcs) */
/* Command-line: gperf -p -j1 -i 1 -g -o -t -G -N is_reserved_word -k1,3,$ /puke/law/tmp/merge/egcs/gcc/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,$ ./c-parse.gperf */
/* Command-line: gperf -p -j1 -i 1 -g -o -t -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 -N is_reserved_word -k1,3,$ c-parse.gperf */
struct resword { char *name; short token; enum rid rid; }; struct resword { char *name; short token; enum rid rid; };
#define TOTAL_KEYWORDS 79 #define TOTAL_KEYWORDS 79
...@@ -11,28 +11,41 @@ struct resword { char *name; short token; enum rid rid; }; ...@@ -11,28 +11,41 @@ struct resword { char *name; short token; enum rid rid; };
/* maximum key range = 135, duplicates = 0 */ /* maximum key range = 135, duplicates = 0 */
#ifdef __GNUC__ #ifdef __GNUC__
inline __inline
#endif #endif
static unsigned int static unsigned int
hash (str, len) hash (str, len)
register char *str; register char *str;
register int unsigned len; register unsigned int len;
{ {
static unsigned char asso_values[] = 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, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
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, 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, 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, 145, 145, 145, 145, 145, 1, 145, 46, 8, 15,
61, 6, 36, 48, 3, 5, 145, 18, 63, 25, 61, 6, 36, 48, 3, 5, 145, 18, 63, 25,
29, 76, 1, 145, 13, 2, 1, 51, 37, 9, 29, 76, 1, 145, 13, 2, 1, 51, 37, 9,
9, 1, 3, 145, 145, 145, 145, 145, 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
}; };
register int hval = len; register int hval = len;
...@@ -40,130 +53,130 @@ hash (str, len) ...@@ -40,130 +53,130 @@ hash (str, len)
{ {
default: default:
case 3: case 3:
hval += asso_values[str[2]]; hval += asso_values[(unsigned char)str[2]];
case 2: case 2:
case 1: case 1:
hval += asso_values[str[0]]; hval += asso_values[(unsigned char)str[0]];
break; break;
} }
return hval + asso_values[str[len - 1]]; return hval + asso_values[(unsigned char)str[len - 1]];
} }
static struct resword wordlist[] = static struct resword wordlist[] =
{ {
{"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
{"",}, {"", 0, 0},
{"int", TYPESPEC, RID_INT}, {"int", TYPESPEC, RID_INT},
{"",}, {"",}, {"", 0, 0}, {"", 0, 0},
{"__typeof__", TYPEOF, NORID}, {"__typeof__", TYPEOF, NORID},
{"__signed__", TYPESPEC, RID_SIGNED}, {"__signed__", TYPESPEC, RID_SIGNED},
{"__imag__", IMAGPART, NORID}, {"__imag__", IMAGPART, NORID},
{"switch", SWITCH, NORID}, {"switch", SWITCH, NORID},
{"__inline__", SCSPEC, RID_INLINE}, {"__inline__", SCSPEC, RID_INLINE},
{"else", ELSE, NORID}, {"else", ELSE, NORID},
{"__iterator__", SCSPEC, RID_ITERATOR}, {"__iterator__", SCSPEC, RID_ITERATOR},
{"__inline", SCSPEC, RID_INLINE}, {"__inline", SCSPEC, RID_INLINE},
{"__extension__", EXTENSION, NORID}, {"__extension__", EXTENSION, NORID},
{"struct", STRUCT, NORID}, {"struct", STRUCT, NORID},
{"__real__", REALPART, NORID}, {"__real__", REALPART, NORID},
{"__const", TYPE_QUAL, RID_CONST}, {"__const", TYPE_QUAL, RID_CONST},
{"while", WHILE, NORID}, {"while", WHILE, NORID},
{"__const__", TYPE_QUAL, RID_CONST}, {"__const__", TYPE_QUAL, RID_CONST},
{"case", CASE, NORID}, {"case", CASE, NORID},
{"__complex__", TYPESPEC, RID_COMPLEX}, {"__complex__", TYPESPEC, RID_COMPLEX},
{"__iterator", SCSPEC, RID_ITERATOR}, {"__iterator", SCSPEC, RID_ITERATOR},
{"bycopy", TYPE_QUAL, RID_BYCOPY}, {"bycopy", TYPE_QUAL, RID_BYCOPY},
{"",}, {"",}, {"",}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
{"__complex", TYPESPEC, RID_COMPLEX}, {"__complex", TYPESPEC, RID_COMPLEX},
{"",}, {"", 0, 0},
{"in", TYPE_QUAL, RID_IN}, {"in", TYPE_QUAL, RID_IN},
{"break", BREAK, NORID}, {"break", BREAK, NORID},
{"@defs", DEFS, NORID}, {"@defs", DEFS, NORID},
{"",}, {"",}, {"",}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
{"extern", SCSPEC, RID_EXTERN}, {"extern", SCSPEC, RID_EXTERN},
{"if", IF, NORID}, {"if", IF, NORID},
{"typeof", TYPEOF, NORID}, {"typeof", TYPEOF, NORID},
{"typedef", SCSPEC, RID_TYPEDEF}, {"typedef", SCSPEC, RID_TYPEDEF},
{"__typeof", TYPEOF, NORID}, {"__typeof", TYPEOF, NORID},
{"sizeof", SIZEOF, NORID}, {"sizeof", SIZEOF, NORID},
{"",}, {"", 0, 0},
{"return", RETURN, NORID}, {"return", RETURN, NORID},
{"const", TYPE_QUAL, RID_CONST}, {"const", TYPE_QUAL, RID_CONST},
{"__volatile__", TYPE_QUAL, RID_VOLATILE}, {"__volatile__", TYPE_QUAL, RID_VOLATILE},
{"@private", PRIVATE, NORID}, {"@private", PRIVATE, NORID},
{"@selector", SELECTOR, NORID}, {"@selector", SELECTOR, NORID},
{"__volatile", TYPE_QUAL, RID_VOLATILE}, {"__volatile", TYPE_QUAL, RID_VOLATILE},
{"__asm__", ASM_KEYWORD, NORID}, {"__asm__", ASM_KEYWORD, NORID},
{"",}, {"",}, {"", 0, 0}, {"", 0, 0},
{"continue", CONTINUE, NORID}, {"continue", CONTINUE, NORID},
{"__alignof__", ALIGNOF, NORID}, {"__alignof__", ALIGNOF, NORID},
{"__imag", IMAGPART, NORID}, {"__imag", IMAGPART, NORID},
{"__attribute__", ATTRIBUTE, NORID}, {"__attribute__", ATTRIBUTE, NORID},
{"",}, {"",}, {"", 0, 0}, {"", 0, 0},
{"__attribute", ATTRIBUTE, NORID}, {"__attribute", ATTRIBUTE, NORID},
{"for", FOR, NORID}, {"for", FOR, NORID},
{"",}, {"", 0, 0},
{"@encode", ENCODE, NORID}, {"@encode", ENCODE, NORID},
{"id", OBJECTNAME, RID_ID}, {"id", OBJECTNAME, RID_ID},
{"static", SCSPEC, RID_STATIC}, {"static", SCSPEC, RID_STATIC},
{"@interface", INTERFACE, NORID}, {"@interface", INTERFACE, NORID},
{"",}, {"", 0, 0},
{"__signed", TYPESPEC, RID_SIGNED}, {"__signed", TYPESPEC, RID_SIGNED},
{"",}, {"", 0, 0},
{"__label__", LABEL, NORID}, {"__label__", LABEL, NORID},
{"",}, {"",}, {"", 0, 0}, {"", 0, 0},
{"__asm", ASM_KEYWORD, NORID}, {"__asm", ASM_KEYWORD, NORID},
{"char", TYPESPEC, RID_CHAR}, {"char", TYPESPEC, RID_CHAR},
{"",}, {"", 0, 0},
{"inline", SCSPEC, RID_INLINE}, {"inline", SCSPEC, RID_INLINE},
{"out", TYPE_QUAL, RID_OUT}, {"out", TYPE_QUAL, RID_OUT},
{"register", SCSPEC, RID_REGISTER}, {"register", SCSPEC, RID_REGISTER},
{"__real", REALPART, NORID}, {"__real", REALPART, NORID},
{"short", TYPESPEC, RID_SHORT}, {"short", TYPESPEC, RID_SHORT},
{"",}, {"", 0, 0},
{"enum", ENUM, NORID}, {"enum", ENUM, NORID},
{"inout", TYPE_QUAL, RID_INOUT}, {"inout", TYPE_QUAL, RID_INOUT},
{"",}, {"", 0, 0},
{"oneway", TYPE_QUAL, RID_ONEWAY}, {"oneway", TYPE_QUAL, RID_ONEWAY},
{"union", UNION, NORID}, {"union", UNION, NORID},
{"",}, {"", 0, 0},
{"__alignof", ALIGNOF, NORID}, {"__alignof", ALIGNOF, NORID},
{"",}, {"", 0, 0},
{"@implementation", IMPLEMENTATION, NORID}, {"@implementation", IMPLEMENTATION, NORID},
{"",}, {"", 0, 0},
{"@class", CLASS, NORID}, {"@class", CLASS, NORID},
{"",}, {"", 0, 0},
{"@public", PUBLIC, NORID}, {"@public", PUBLIC, NORID},
{"asm", ASM_KEYWORD, NORID}, {"asm", ASM_KEYWORD, NORID},
{"",}, {"",}, {"",}, {"",}, {"",}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
{"default", DEFAULT, NORID}, {"default", DEFAULT, NORID},
{"",}, {"", 0, 0},
{"void", TYPESPEC, RID_VOID}, {"void", TYPESPEC, RID_VOID},
{"",}, {"", 0, 0},
{"@protected", PROTECTED, NORID}, {"@protected", PROTECTED, NORID},
{"@protocol", PROTOCOL, NORID}, {"@protocol", PROTOCOL, NORID},
{"",}, {"",}, {"",}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
{"volatile", TYPE_QUAL, RID_VOLATILE}, {"volatile", TYPE_QUAL, RID_VOLATILE},
{"",}, {"",}, {"", 0, 0}, {"", 0, 0},
{"signed", TYPESPEC, RID_SIGNED}, {"signed", TYPESPEC, RID_SIGNED},
{"float", TYPESPEC, RID_FLOAT}, {"float", TYPESPEC, RID_FLOAT},
{"@end", END, NORID}, {"@end", END, NORID},
{"",}, {"",}, {"", 0, 0}, {"", 0, 0},
{"unsigned", TYPESPEC, RID_UNSIGNED}, {"unsigned", TYPESPEC, RID_UNSIGNED},
{"@compatibility_alias", ALIAS, NORID}, {"@compatibility_alias", ALIAS, NORID},
{"double", TYPESPEC, RID_DOUBLE}, {"double", TYPESPEC, RID_DOUBLE},
{"",}, {"",}, {"", 0, 0}, {"", 0, 0},
{"auto", SCSPEC, RID_AUTO}, {"auto", SCSPEC, RID_AUTO},
{"",}, {"", 0, 0},
{"goto", GOTO, NORID}, {"goto", GOTO, NORID},
{"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
{"do", DO, NORID}, {"do", DO, NORID},
{"",}, {"",}, {"",}, {"",}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0}, {"", 0, 0},
{"long", TYPESPEC, RID_LONG}, {"long", TYPESPEC, RID_LONG}
}; };
#ifdef __GNUC__ #ifdef __GNUC__
inline __inline
#endif #endif
struct resword * struct resword *
is_reserved_word (str, len) is_reserved_word (str, len)
...@@ -178,7 +191,7 @@ is_reserved_word (str, len) ...@@ -178,7 +191,7 @@ is_reserved_word (str, len)
{ {
register char *s = wordlist[key].name; register char *s = wordlist[key].name;
if (*s == *str && !strcmp (str + 1, s + 1)) if (*str == *s && !strcmp (str + 1, s + 1))
return &wordlist[key]; return &wordlist[key];
} }
} }
......
%{ %{
/* Command-line: gperf -p -j1 -i 1 -g -o -t -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 -N is_reserved_word -k1,3,$ c-parse.gperf */
%} %}
struct resword { char *name; short token; enum rid rid; }; struct resword { char *name; short token; enum rid rid; };
%% %%
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment