This is the mail archive of the java-patches@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]

Generate TYPE_STUB_DECLs for Java array types


We don't generate TYPE_STUB_DECLs for Java array types.  Under some
unusual circumstances this may cause segfaults in debuginfo
generation.  Fixed thusly.  

Java doesn't have typedefs: I presume it's legal simply to set the
TYPE_STUB_DECL for an array type to the TYPE_DECL for that array type.
Setting TYPE_DECL_SUPPRESS_DEBUG on the type decl is just to save
space, as I don't think there's much gdb can do with it.

Andrew.


2006-02-08  Andrew Haley  <aph@redhat.com>

	* typeck.c (build_java_array_type): Generate TYPE_STUB_DECLs for
	array types.
	
Index: typeck.c
===================================================================
--- typeck.c    (revision 110703)
+++ typeck.c    (working copy)
@@ -385,9 +385,11 @@
     else
       strcpy (suffix, "[]");
     TYPE_NAME (t) 
+      = TYPE_STUB_DECL (t)
       = build_decl (TYPE_DECL,
                    identifier_subst (el_name, "", '.', '.', suffix),
                              t);
+    TYPE_DECL_SUPPRESS_DEBUG (TYPE_STUB_DECL (t)) = true;
   }
 
   set_java_signature (t, sig);


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