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]

[gcjx] Patch: FYI: class literal fixlet


I'm checking this in on the gcjx branch.

This fixes a crash with class literals.  'void' is not a primitive
type so we must check for it explicitly.

Tom

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

	* model/classref.cc (resolve): Handle void type specially.

Index: model/classref.cc
===================================================================
--- model/classref.cc	(revision 107604)
+++ model/classref.cc	(working copy)
@@ -47,7 +47,7 @@
   if (global->get_compiler ()->feature_generics ())
     {
       model_type *boxed = klass->type ();
-      if (boxed->primitive_p ())
+      if (boxed->primitive_p () || boxed == primitive_void_type)
 	boxed = box_primitive_type (boxed);
       model_class *boxed_class = assert_cast<model_class *> (boxed);
 


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