[patch] fix c++ compilation warnings and test cases

Andreas Tobler toa@pop.agri.ch
Tue Jul 3 20:23:00 GMT 2007


Hi all,

this patch introduced|uncovered a c++ issue in java/lang/Class.h

http://gcc.gnu.org/viewcvs?view=rev&revision=126219

Right now all *.cc testcases fail due to the ? redundant ?
declarations in Class.h. Also the compilation of the *.cc source files 
spits this warning:

java/lang/Class.h:276: warning: declaration 'struct 
java::lang::ClassLoader' does not declare anything

etc ....

I tested the attached patch on i686-darwin and ppc-darwin.

Maybe a c++ experienced person has an additional comment.

I think it is ok, but I'm not c++ experienced, I only look at the 
compilation and the test case run ;)

Tom, does the // Friend classes comment only belong to the declarations 
I'd like to remove or also to the following ones?

Ok for main?

Thanks,
Andreas

2007-07-03  Andreas Tobler  <a.tobler@schweiz.org>

	* java/lang/Class.h: Remove redundant 'class java::*::* declarations.

Index: java/lang/Class.h
===================================================================
--- java/lang/Class.h   (revision 126262)
+++ java/lang/Class.h   (working copy)
@@ -272,14 +272,6 @@

  jbyte _Jv_GetClassState (jclass);

-// Friend classes and functions to implement the ClassLoader
-class java::lang::ClassLoader;
-class java::lang::VMClassLoader;
-
-class java::io::ObjectOutputStream;
-class java::io::ObjectInputStream;
-class java::io::ObjectStreamClass;
-
  void _Jv_RegisterClassHookDefault (jclass klass);
  void _Jv_RegisterInitiatingLoader (jclass,java::lang::ClassLoader*);
  void _Jv_UnregisterInitiatingLoader (jclass,java::lang::ClassLoader*);
@@ -319,7 +311,6 @@

  class _Jv_StackTrace;
  class _Jv_BytecodeVerifier;
-class java::io::VMObjectStreamClass;

  void _Jv_sharedlib_register_hook (jclass klass);



More information about the Java-patches mailing list