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]

[PATCH] C++ patch to build the Java runtime with ENABLE_TREE_CHECKING.


The Java front-end wasn't ready for ENABLE_TREE_CHECKING to be turned
on by default, but I'm fixing it right now. When compiling the
runtime, I ran accross two g++ front-end problems related to the check
on tree nodes. Here's a patch. OK to commit?

./A

2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>

        * class.c (push_lang_context): TYPE_NAME gets you to the Java
        types DECLs.
        * decl.c (check_goto): Non DECL labels treated as not yet defined
        ones.

Index: class.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/class.c,v
retrieving revision 1.320
diff -u -p -r1.320 class.c
--- class.c	2000/06/14 16:10:14	1.320
+++ class.c	2000/06/21 05:00:02
@@ -5682,14 +5682,14 @@ push_lang_context (name)
 	 (See record_builtin_java_type in decl.c.)  However, that causes
 	 incorrect debug entries if these types are actually used.
 	 So we re-enable debug output after extern "Java". */
-      DECL_IGNORED_P (java_byte_type_node) = 0;
-      DECL_IGNORED_P (java_short_type_node) = 0;
-      DECL_IGNORED_P (java_int_type_node) = 0;
-      DECL_IGNORED_P (java_long_type_node) = 0;
-      DECL_IGNORED_P (java_float_type_node) = 0;
-      DECL_IGNORED_P (java_double_type_node) = 0;
-      DECL_IGNORED_P (java_char_type_node) = 0;
-      DECL_IGNORED_P (java_boolean_type_node) = 0;
+      DECL_IGNORED_P (TYPE_NAME (java_byte_type_node)) = 0;
+      DECL_IGNORED_P (TYPE_NAME (java_short_type_node)) = 0;
+      DECL_IGNORED_P (TYPE_NAME (java_int_type_node)) = 0;
+      DECL_IGNORED_P (TYPE_NAME (java_long_type_node)) = 0;
+      DECL_IGNORED_P (TYPE_NAME (java_float_type_node)) = 0;
+      DECL_IGNORED_P (TYPE_NAME (java_double_type_node)) = 0;
+      DECL_IGNORED_P (TYPE_NAME (java_char_type_node)) = 0;
+      DECL_IGNORED_P (TYPE_NAME (java_boolean_type_node)) = 0;
     }
   else if (name == lang_name_c)
     {
Index: decl.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/decl.c,v
retrieving revision 1.638
diff -u -p -r1.638 decl.c
--- decl.c	2000/06/19 18:40:21	1.638
+++ decl.c	2000/06/21 05:00:38
@@ -5025,7 +5025,7 @@ check_goto (decl)
   struct named_label_list *lab;
 
   /* If the label hasn't been defined yet, defer checking.  */
-  if (! DECL_INITIAL (decl))
+  if (! DECL_P (decl) || ! DECL_INITIAL (decl))
     {
       use_label (decl);
       return;

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