This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Patch installed to generate java/keyword.h in ISO C style


To be thorough in eliminating K&R style, I made the following change
so that keyword.h (generated by gperf) also uses ISO C.

I included the generated file so you can see what I mean.

Tested on sparc-sun-solaris2.7 and installed as obvious.

		--Kaveh


2003-01-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>

	* Make-lang.in (keyword.h): Pass "-L ANSI-C" to gperf.

	* keyword.h: Regenerated.

diff -rup orig/egcc-CVS20030110/gcc/java/Make-lang.in egcc-CVS20030110/gcc/java/Make-lang.in
--- orig/egcc-CVS20030110/gcc/java/Make-lang.in	2003-01-09 21:35:24.000000000 -0500
+++ egcc-CVS20030110/gcc/java/Make-lang.in	2003-01-10 23:40:42.785642331 -0500
@@ -92,7 +92,7 @@ $(srcdir)/java/parse-scan.c:  $(srcdir)/
 
 $(srcdir)/java/keyword.h: $(srcdir)/java/keyword.gperf
 	(cd $(srcdir)/java || exit 1; \
-	gperf -L C -C -F ', 0' -p -t -j1 -i 1 -g -o -N java_keyword -k1,4,$$ \
+	gperf -L ANSI-C -C -F ', 0' -p -t -j1 -i 1 -g -o -N java_keyword -k1,4,$$ \
 		keyword.gperf > k$$$$.h || { \
 	echo "Please update gperf from ftp://ftp.gnu.org/pub/gnu/gperf/"; >&2; \
 	rm -f k$$$$.h; \
diff -rup orig/egcc-CVS20030110/gcc/java/keyword.h egcc-CVS20030110/gcc/java/keyword.h
--- orig/egcc-CVS20030110/gcc/java/keyword.h	2003-01-09 18:13:20.000000000 -0500
+++ egcc-CVS20030110/gcc/java/keyword.h	2003-01-10 23:40:42.925642800 -0500
@@ -1,5 +1,5 @@
-/* C code produced by gperf version 2.7.2 */
-/* Command-line: gperf -L C -C -F ', 0' -p -t -j1 -i 1 -g -o -N java_keyword -k'1,4,$' keyword.gperf  */
+/* ANSI-C code produced by gperf version 2.7.2 */
+/* Command-line: gperf -L ANSI-C -C -F ', 0' -p -t -j1 -i 1 -g -o -N java_keyword -k'1,4,$' keyword.gperf  */
 /* Keyword definition for the GNU compiler for the Java(TM) language.
    Copyright (C) 1997, 1998, 2001, 2002, 2003
    Free Software Foundation, Inc.
@@ -51,9 +51,7 @@ inline
 #endif
 #endif
 static unsigned int
-hash (str, len)
-     register const char *str;
-     register unsigned int len;
+hash (register const char *str, register unsigned int len)
 {
   static const unsigned char asso_values[] =
     {
@@ -104,9 +102,7 @@ hash (str, len)
 __inline
 #endif
 const struct java_keyword *
-java_keyword (str, len)
-     register const char *str;
-     register unsigned int len;
+java_keyword (register const char *str, register unsigned int len)
 {
   static const struct java_keyword wordlist[] =
     {


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]