This is the mail archive of the gcc@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]

Building with -ansi -D_POSIX_C_SOURCE=2; results encouraging


In a spirit of scientific inquiry I ran a bootstrap of the gcc
subdirectory only, with BOOT_CFLAGS set to include -ansi
-D_POSIX_C_SOURCE=2, which has the effect of limiting system headers
to routines and types specified in C89, POSIX.1, and POSIX.2 (the
originals, not the 1993 and 1995 revisions).

The only problem encountered was a single use of // commentary in
java/verify.c.  We didn't even get any additional missing-prototype
warnings.  I've changed that to /* comments; patch appended.

The target libraries (esp. libstdc++) may have more problems with this
stunt, but then it's not clear that it makes sense for them.  I do
think it makes sense for the compiler itself.

-- 
zw    The master came to a yatai which was selling hot dogs. 'What do you
      want on your hot dog?' he was asked. 'Nothing,' he replied. Then the
      hot dog was enlightened.
      	-- a koan by Eric Hallstrom

	* java/verify.c: Don't use // comments.

===================================================================
Index: java/verify.c
--- java/verify.c	2001/04/29 11:24:37	1.43
+++ java/verify.c	2001/07/07 18:23:36
@@ -1052,8 +1052,8 @@ verify_jvm_instructions (jcf, byte_ops, 
 		  if (!nargs || notZero)
 		      VERIFICATION_ERROR 
 		        ("invalid argument number in invokeinterface");
-		  // If we verify/resolve the constant pool, as we should,
-		  // this test (and the one just following) are redundant.
+		  /* If we verify/resolve the constant pool, as we should,
+		     this test (and the one just following) are redundant.  */
 		  if (! self_is_interface)
 		    VERIFICATION_ERROR ("invokeinterface calls method not in interface");
 		  break;


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