From 63e5baa6c94c623a07cf32c8dd67ab9c08a71b73 Mon Sep 17 00:00:00 2001 From: "Kaveh R. Ghazi" Date: Wed, 31 Mar 1999 07:48:00 +0000 Subject: [PATCH] Makefile.in (hash.h): Generate using gperf language 'C'... * Makefile.in (hash.h): Generate using gperf language 'C', not 'KR-C', so gperf uses the `const' keyword on strings. * gperf (resword): Const-ify a char*. From-SVN: r26080 --- gcc/ch/ChangeLog | 7 +++++++ gcc/ch/Makefile.in | 2 +- gcc/ch/gperf | 2 +- gcc/ch/hash.h | 14 +++++++------- 4 files changed, 16 insertions(+), 9 deletions(-) diff --git a/gcc/ch/ChangeLog b/gcc/ch/ChangeLog index cd30f8c1027..886785d1356 100644 --- a/gcc/ch/ChangeLog +++ b/gcc/ch/ChangeLog @@ -1,3 +1,10 @@ +Wed Mar 31 10:44:47 1999 Kaveh R. Ghazi + + * Makefile.in (hash.h): Generate using gperf language 'C', not + 'KR-C', so gperf uses the `const' keyword on strings. + + * gperf (resword): Const-ify a char*. + Sun Mar 28 00:30:36 1999 Jeffrey A Law (law@cygnus.com) * Make-lang.in (CHILL.dvi): New target. diff --git a/gcc/ch/Makefile.in b/gcc/ch/Makefile.in index 0d9fd777bb6..5dbc26a238a 100644 --- a/gcc/ch/Makefile.in +++ b/gcc/ch/Makefile.in @@ -266,7 +266,7 @@ $(srcdir)/hash.h: gawk '{ printf ("s/^%s,/%s,/\n", $$1, toupper ($$1)) }' < gperf.tmp > sed.tmp sed -f sed.tmp < gperf.tmp > gperf.tmp2 cat $(srcdir)/gperf gperf.tmp2 > gperf.tmp - gperf -L KR-C -F ', 0, 0, 0' -D -E -S1 -p -j1 -i 1 -g -o -t -k'*' \ + gperf -L C -F ', 0, 0, 0' -D -E -S1 -p -j1 -i 1 -g -o -t -k'*' \ gperf.tmp > $(srcdir)/hash.h $(RM) gperf.tmp gperf.tmp2 sed.tmp diff --git a/gcc/ch/gperf b/gcc/ch/gperf index a499a32498f..20d05961aa7 100644 --- a/gcc/ch/gperf +++ b/gcc/ch/gperf @@ -1,5 +1,5 @@ struct resword { - char *name; + const char *name; short token; enum rid rid; enum toktype { RESERVED, DIRECTIVE, PREDEF } flags; diff --git a/gcc/ch/hash.h b/gcc/ch/hash.h index 62d9039e753..1f0d59493c2 100644 --- a/gcc/ch/hash.h +++ b/gcc/ch/hash.h @@ -1,7 +1,7 @@ -/* KR-C code produced by gperf version 2.7.1 (19981006 egcs) */ -/* Command-line: gperf -L KR-C -F , 0, 0, 0 -D -E -S1 -p -j1 -i 1 -g -o -t -k* gperf.tmp */ +/* C code produced by gperf version 2.7.1 (19981006 egcs) */ +/* Command-line: gperf -L C -F , 0, 0, 0 -D -E -S1 -p -j1 -i 1 -g -o -t -k* gperf.tmp */ struct resword { - char *name; + const char *name; short token; enum rid rid; enum toktype { RESERVED, DIRECTIVE, PREDEF } flags; @@ -14,7 +14,7 @@ __inline #endif static unsigned int hash (str, len) - register char *str; + register const char *str; register unsigned int len; { static unsigned short asso_values[] = @@ -121,7 +121,7 @@ __inline #endif struct resword * in_word_set (str, len) - register char *str; + register const char *str; register unsigned int len; { enum @@ -1342,7 +1342,7 @@ in_word_set (str, len) multicompare: while (wordptr < wordendptr) { - register char *s = wordptr->name; + register const char *s = wordptr->name; if (*str == *s && !strcmp (str + 1, s + 1)) return wordptr; @@ -1351,7 +1351,7 @@ in_word_set (str, len) return 0; compare: { - register char *s = resword->name; + register const char *s = resword->name; if (*str == *s && !strcmp (str + 1, s + 1)) return resword;