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]

egcs-19980914: jcf-write.c: reserved identifier violation


According to the C standard, "all identifiers that begin with an
underscore and either an upper-case letter or another underscore
are always reserved for any use."  Macros in "jcf-write.c" declare
variables named "_I", which is such a reserved name.  This breaks the
build under FreeBSD.

The following patch fixes it.  It is OK to use "_i" because that is
reserved only for names with file scope.


--- gcc/java/jcf-write.c.orig	Mon Sep 14 02:42:19 1998
+++ gcc/java/jcf-write.c	Thu Sep 24 10:39:28 1998
@@ -52,13 +52,13 @@
 /* Like OP1, but I is a 2-byte big endian integer. */
 
 #define OP2(I) \
-  do { int _I = (I);  OP1 (_I >> 8);  OP1 (_I); } while (0)
+  do { int _i = (I);  OP1 (_i >> 8);  OP1 (_i); } while (0)
 
 /* Like OP1, but I is a 4-byte big endian integer. */
 
 #define OP4(I) \
-  do { int _I = (I);  OP1 (_I >> 24);  OP1 (_I >> 16); \
-       OP1 (_I >> 8); OP1 (_I); } while (0)
+  do { int _i = (I);  OP1 (_i >> 24);  OP1 (_i >> 16); \
+       OP1 (_i >> 8); OP1 (_i); } while (0)
 
 /* The current stack size (stack pointer) in the current method. */
 


--
   John Polstra                                       jdp@polstra.com
   John D. Polstra & Co., Inc.                Seattle, Washington USA
   "Self-knowledge is always bad news."                 -- John Barth


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