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: handle DECL_EXTERNAL properly


I'm checking this in on the gcjx branch.

We were setting DECL_EXTERNAL on instance fields, which resulted in
strange-looking tree dumps.  (It is unclear if it had any other bad
effects.)  This fixes that.

Tom

Index: ChangeLog
from  Tom Tromey  <tromey@redhat.com>
	* builtins.cc (add): Only set DECL_EXTERNAL for static fields.

Index: builtins.cc
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/Attic/builtins.cc,v
retrieving revision 1.1.2.17
diff -u -r1.1.2.17 builtins.cc
--- builtins.cc 8 Mar 2005 17:35:29 -0000 1.1.2.17
+++ builtins.cc 8 Mar 2005 21:38:19 -0000
@@ -174,7 +174,6 @@
 			    map_identifier (field->get_name ()),
 			    map_type (field->type ()));
   DECL_CONTEXT (result) = context;
-  DECL_EXTERNAL (result) = 1;	// FIXME unless we're compiling it...
   TREE_PUBLIC (result) = 1;
   if (field->static_p ())
     SET_DECL_ASSEMBLER_NAME (result,
@@ -186,6 +185,8 @@
       TREE_CHAIN (result) = TYPE_FIELDS (context);
       TYPE_FIELDS (context) = result;
     }
+  else
+    DECL_EXTERNAL (result) = 1;	// FIXME unless we're compiling it...
 
   fieldmap[field] = result;
 }


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