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]

Patch: Fix for PR 5088


This fixes PR 5088.  We were mangling the Object constructor as a
not-in-charge constructor, but I believe that is wrong.  This patch
changes gcj so that all constructors are mangled as in-charge
constructors.

Tested on x86 RHL 6.2.

Ok to commit?

Tom


Index: ChangeLog
from  Tom Tromey  <tromey@redhat.com>

	* mangle.c (mangle_method_decl): Never emit `C2' constructor.
	Fixes PR java/5088.

Index: mangle.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/mangle.c,v
retrieving revision 1.19
diff -u -r1.19 mangle.c
--- mangle.c 2001/12/03 19:13:40 1.19
+++ mangle.c 2001/12/16 22:17:57
@@ -142,20 +142,13 @@
   /* Mangle the name of the type that contains mdecl */
   mangle_record_type (DECL_CONTEXT (mdecl), /* for_pointer = */ 0);
 
-  /* Mangle the function name. There three cases
-       - mdecl is java.lang.Object.Object(), use `C2' for its name
-         (denotes a base object constructor.)
+  /* Mangle the function name.  There are two cases:
        - mdecl is a constructor, use `C1' for its name, (denotes a
          complete object constructor.)
        - mdecl is not a constructor, standard mangling is performed.
      We terminate the mangled function name with a `E'. */
   if (ID_INIT_P (method_name))
-    {
-      if (DECL_CONTEXT (mdecl) == object_type_node)
-	obstack_grow (mangle_obstack, "C2", 2);
-      else
-	obstack_grow (mangle_obstack, "C1", 2);
-    }
+    obstack_grow (mangle_obstack, "C1", 2);
   else
     mangle_member_name (method_name);
   obstack_1grow (mangle_obstack, 'E');


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