This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Error: Non-static method overrides static method
- From: Florian Bourgier <fbourgier at sycomore-multimedia dot com>
- To: Ranjit Mathew <rmathew at gmail dot com>
- Cc: java at gcc dot gnu dot org
- Date: Fri, 16 Jul 2004 15:38:44 +0200
- Subject: Re: Error: Non-static method overrides static method
- References: <40DAEFA5.9030106@sycomore-multimedia.com> <16602.61864.555471.522138@cuddles.cambridge.redhat.com> <40DBEC0D.3050303@sycomore-multimedia.com> <40DC261A.8030801@gmail.com>
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