]> gcc.gnu.org Git - gcc.git/commitdiff
Makefile.in (hash.h): Generate using gperf language 'C'...
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>
Wed, 31 Mar 1999 07:51:10 +0000 (07:51 +0000)
committerKaveh Ghazi <ghazi@gcc.gnu.org>
Wed, 31 Mar 1999 07:51:10 +0000 (07:51 +0000)
        * Makefile.in (hash.h): Generate using gperf language 'C', not
        'KR-C', so gperf uses the `const' keyword on strings.
        * gxx.gperf (resword): Const-ify a char*.

From-SVN: r26081

gcc/cp/ChangeLog
gcc/cp/Makefile.in
gcc/cp/gxx.gperf
gcc/cp/hash.h

index 62c1821a0cb61160f5b681446edbde00a761aa60..06bb240f29cf51ee63b7184ab5ca2e4b6e66ed01 100644 (file)
@@ -1,3 +1,10 @@
+Wed Mar 31 10:48:29 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+        * Makefile.in (hash.h): Generate using gperf language 'C', not
+        'KR-C', so gperf uses the `const' keyword on strings.
+        
+        * gxx.gperf (resword): Const-ify a char*.
+
 1999-03-30  Jason Merrill  <jason@yorick.cygnus.com>
 
        * cp-tree.h (IDENTIFIER_AS_DESC, IDENTIFIER_AS_LIST, 
index ef81437d2aefbfb73e84c5b772533dc1856365da..ae156e66690496dfd47b4e0da8ac9a93622a3105 100644 (file)
@@ -245,7 +245,7 @@ $(PARSE_C) : $(srcdir)/parse.y
 # the C front-end already requires this if c-parse.gperf is changed,
 # so we should be consistent.
 $(srcdir)/hash.h: $(srcdir)/gxx.gperf
-       gperf -L KR-C -F ', 0, 0' -p -j1 -g -o -t -N is_reserved_word \
+       gperf -L C -F ', 0, 0' -p -j1 -g -o -t -N is_reserved_word \
                '-k1,4,7,$$' $(srcdir)/gxx.gperf >$(srcdir)/hash.h
 
 spew.o : spew.c $(CONFIG_H) $(CXX_TREE_H) $(PARSE_H) $(srcdir)/../flags.h \
index 5632f7f34a5460e70fd6b140cb896d58770a152a..42762e6099854f19eff25d7d034c2c8d3d6c7936 100644 (file)
@@ -1,7 +1,7 @@
 %{
 /* Command-line: gperf -L KR-C -F ', 0, 0' -p -j1 -g -o -t -N is_reserved_word -k1,4,$,7 gplus.gperf  */
 %}
-struct resword { char *name; short token; enum rid rid;};
+struct resword { const char *name; short token; enum rid rid;};
 %%
 __alignof, ALIGNOF, NORID
 __alignof__, ALIGNOF, NORID
index 71c2f317ffef98bebb1a281649985a4ac74929b0..4cc867946b12501eb5a898e7d56d245716bad1c3 100644 (file)
@@ -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 -g -o -t -N is_reserved_word -k1,4,7,$ ../../../gcc/cp/gxx.gperf  */
+/* C code produced by gperf version 2.7.1 (19981006 egcs) */
+/* Command-line: gperf -L C -F , 0, 0 -p -j1 -g -o -t -N is_reserved_word -k1,4,7,$ ./gxx.gperf  */
 /* Command-line: gperf -L KR-C -F ', 0, 0' -p -j1 -g -o -t -N is_reserved_word -k1,4,$,7 gplus.gperf  */
-struct resword { char *name; short token; enum rid rid;};
+struct resword { const char *name; short token; enum rid rid;};
 
 #define TOTAL_KEYWORDS 106
 #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[] =
@@ -72,7 +72,7 @@ __inline
 #endif
 struct resword *
 is_reserved_word (str, len)
-     register char *str;
+     register const char *str;
      register unsigned int len;
 {
   static struct resword wordlist[] =
@@ -227,7 +227,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];
This page took 0.096002 seconds and 5 git commands to generate.