diff options
author | Andrew Haley <aph@redhat.com> | 2004-12-03 18:01:59 +0000 |
---|---|---|
committer | Andrew Haley <aph@gcc.gnu.org> | 2004-12-03 18:01:59 +0000 |
commit | 3381c28f38982fa0a8b6498d890a017e44138851 (patch) | |
tree | 2d0099ef6c8739b73bd39d9b00dd305386d854a6 /gcc/java/class.c | |
parent | 5edea4c66480239d8a6c75ca976af634ea6d1253 (diff) | |
download | gcc-3381c28f38982fa0a8b6498d890a017e44138851.zip gcc-3381c28f38982fa0a8b6498d890a017e44138851.tar.gz gcc-3381c28f38982fa0a8b6498d890a017e44138851.tar.bz2 |
re PR java/18697 (Miscompilation of GtkMenuItemPeer.setParent(MenuItem))
2004-12-03 Andrew Haley <aph@redhat.com>
PR java/18697
* class.c (layout_class_method): Don't fail to override a method
simply because it has DECL_ARTIFICIAL set.
From-SVN: r91689
Diffstat (limited to 'gcc/java/class.c')
-rw-r--r-- | gcc/java/class.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/java/class.c b/gcc/java/class.c index 2af0134..c314950 100644 --- a/gcc/java/class.c +++ b/gcc/java/class.c @@ -2338,8 +2338,7 @@ layout_class_method (tree this_class, tree super_class, tree super_method = lookup_argument_method (super_class, method_name, method_sig); if (super_method != NULL_TREE - && ! METHOD_DUMMY (super_method) - && ! DECL_ARTIFICIAL (super_method)) + && ! METHOD_DUMMY (super_method)) { method_override = true; if (! METHOD_PUBLIC (super_method) && @@ -2358,7 +2357,8 @@ layout_class_method (tree this_class, tree super_class, tree method_index = get_method_index (super_method); set_method_index (method_decl, method_index); if (method_index == NULL_TREE - && !CLASS_FROM_SOURCE_P (this_class)) + && !CLASS_FROM_SOURCE_P (this_class) + && ! DECL_ARTIFICIAL (super_method)) error ("%Jnon-static method '%D' overrides static method", method_decl, method_decl); } |