Makefile.in (c-gperf.h): Generate using gperf language 'C'...
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>
Wed, 31 Mar 1999 07:43:52 +0000 (07:43 +0000)
committerKaveh Ghazi <ghazi@gcc.gnu.org>
Wed, 31 Mar 1999 07:43:52 +0000 (07:43 +0000)
        * 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

gcc/ChangeLog
gcc/Makefile.in
gcc/c-gperf.h
gcc/c-parse.gperf

index 080ddab1213b2fef5b927a96ad782f4420882e34..0baed386ac04d0cafb4bee47251504b6f5f3464d 100644 (file)
@@ -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.
index c967ecea68c61b31d8930645b30482cb5ab06fa3..5073767ab07ec149690224b74b56b797cf10e643 100644 (file)
@@ -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
 
index 7ee506085ce552ef36755bcae89b863c426d938a..0b79d11e7c9e5b74abf633b424087c680e8d4d1c 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 -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];
index 324bd249554082e30d10054e6eb1a1d30d0bdf35..888eee9ebe1fce5b9cca42c3bd5be102b7eb2b13 100644 (file)
@@ -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