aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>1999-03-31 07:43:52 +0000
committerKaveh Ghazi <ghazi@gcc.gnu.org>1999-03-31 07:43:52 +0000
commit0728688f0e00c906a5c09d71bdcd088b1e5dd9e4 (patch)
treefd023e5c641ac84a1b4ede05b2b44a12707e3a49
parentbaa5df30bbd1f2bca85e28f30aa5de27dcd1d7fa (diff)
downloadgcc-0728688f0e00c906a5c09d71bdcd088b1e5dd9e4.zip
gcc-0728688f0e00c906a5c09d71bdcd088b1e5dd9e4.tar.gz
gcc-0728688f0e00c906a5c09d71bdcd088b1e5dd9e4.tar.bz2
Makefile.in (c-gperf.h): Generate using gperf language 'C'...
* Makefile.in (c-gperf.h): Generate using gperf language 'C', not 'KR-C', so gperf uses the `const' keyword on strings. * c-parse.gperf (resword): Const-ify a char*. From-SVN: r26079
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/Makefile.in2
-rw-r--r--gcc/c-gperf.h12
-rw-r--r--gcc/c-parse.gperf2
4 files changed, 15 insertions, 8 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 080ddab..0baed386 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+Wed Mar 31 10:33:37 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * Makefile.in (c-gperf.h): Generate using gperf language 'C', not
+ 'KR-C', so gperf uses the `const' keyword on strings.
+
+ * c-parse.gperf (resword): Const-ify a char*.
+
Wed Mar 31 01:49:31 1999 Ian Lance Taylor <ian@zembu.com>
* t-rtems (LIMITS_H_TEST, LIBGCC2_INCLUDES): Define.
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index c967ece..5073767 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -1325,7 +1325,7 @@ $(srcdir)/c-parse.y: c-parse.in
$(srcdir)/move-if-change tmp-c-parse.y $(srcdir)/c-parse.y
$(srcdir)/c-gperf.h: c-parse.gperf
- gperf -L KR-C -F ', 0, 0' -p -j1 -i 1 -g -o -t -G -N is_reserved_word \
+ gperf -L C -F ', 0, 0' -p -j1 -i 1 -g -o -t -G -N is_reserved_word \
-k1,3,$$ $(srcdir)/c-parse.gperf >tmp-gperf.h
$(srcdir)/move-if-change tmp-gperf.h $(srcdir)/c-gperf.h
diff --git a/gcc/c-gperf.h b/gcc/c-gperf.h
index 7ee5060..0b79d11 100644
--- a/gcc/c-gperf.h
+++ b/gcc/c-gperf.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 -p -j1 -i 1 -g -o -t -G -N is_reserved_word -k1,3,$ ../../gcc/c-parse.gperf */
+/* C code produced by gperf version 2.7.1 (19981006 egcs) */
+/* Command-line: gperf -L 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 -N is_reserved_word -k1,3,$ c-parse.gperf */
-struct resword { char *name; short token; enum rid rid; };
+struct resword { const char *name; short token; enum rid rid; };
#define TOTAL_KEYWORDS 83
#define MIN_WORD_LENGTH 2
@@ -15,7 +15,7 @@ __inline
#endif
static unsigned int
hash (str, len)
- register char *str;
+ register const char *str;
register unsigned int len;
{
static unsigned char asso_values[] =
@@ -177,7 +177,7 @@ __inline
#endif
struct resword *
is_reserved_word (str, len)
- register char *str;
+ register const char *str;
register unsigned int len;
{
if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
@@ -186,7 +186,7 @@ is_reserved_word (str, len)
if (key <= MAX_HASH_VALUE && key >= 0)
{
- register char *s = wordlist[key].name;
+ register const char *s = wordlist[key].name;
if (*str == *s && !strcmp (str + 1, s + 1))
return &wordlist[key];
diff --git a/gcc/c-parse.gperf b/gcc/c-parse.gperf
index 324bd24..888eee9 100644
--- a/gcc/c-parse.gperf
+++ b/gcc/c-parse.gperf
@@ -1,7 +1,7 @@
%{
/* 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 { const char *name; short token; enum rid rid; };
%%
@class, CLASS, NORID
@compatibility_alias, ALIAS, NORID