This is the mail archive of the java@gcc.gnu.org mailing list for the Java 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]

Re: Error: Non-static method overrides static method


Hello,

I am still facing my problem. I tried to use gdb but I cant set a breakpoint because i dont have the sources of gcj (where should I put them under the gcj directory so that gdb could fin them ?).

If you see the current sources, $GCC_SRC/gcc/java/class.c
line 2223 (method layout_class_method) is the only place
from where this error is emitted.

Try setting a breakpoint around here and see what is
going wrong...


The code in method layout_class_method is :
if (super_method != NULL_TREE && ! METHOD_PRIVATE (super_method))
   {
     DECL_VINDEX (method_decl) = DECL_VINDEX (super_method);
     if (DECL_VINDEX (method_decl) == NULL_TREE
         && !CLASS_FROM_SOURCE_P (this_class))
       error ("%Jnon-static method '%D' overrides static method",
                  method_decl, method_decl);
   }

what does all these macros means ? why the error is launched ? What is the problem in the tree ?

By the way, I tried the new version of gcj (3.4.1) and the problem is still here.

Thanks for your help.

Florian


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