This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

PR java/18697 [4.0 Regression] Miscompilation of GtkMenuItemPeer.setParent(MenuItem)


Removed some logic that was based on a false premise: DECL_ARTIFICIAL
is irrelevant here.

Andrew.


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.
Index: class.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/class.c,v
retrieving revision 1.217
diff -p -2 -c -r1.217 class.c
*** class.c	27 Nov 2004 20:48:16 -0000	1.217
--- class.c	3 Dec 2004 15:20:44 -0000
*************** layout_class_method (tree this_class, tr
*** 2339,2344 ****
  						  method_sig);
        if (super_method != NULL_TREE
! 	  && ! METHOD_DUMMY (super_method)
! 	  && ! DECL_ARTIFICIAL (super_method))
          {
  	  method_override = true;
--- 2339,2343 ----
  						  method_sig);
        if (super_method != NULL_TREE
! 	  && ! METHOD_DUMMY (super_method))
          {
  	  method_override = true;
*************** layout_class_method (tree this_class, tr
*** 2359,2363 ****
  	  set_method_index (method_decl, method_index);
  	  if (method_index == NULL_TREE 
! 	      && !CLASS_FROM_SOURCE_P (this_class))
  	    error ("%Jnon-static method '%D' overrides static method",
                     method_decl, method_decl);
--- 2358,2363 ----
  	  set_method_index (method_decl, method_index);
  	  if (method_index == NULL_TREE 
! 	      && !CLASS_FROM_SOURCE_P (this_class)
! 	      && ! DECL_ARTIFICIAL (super_method))
  	    error ("%Jnon-static method '%D' overrides static method",
                     method_decl, method_decl);


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