This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] C++ patch to build the Java runtime with ENABLE_TREE_CHECKING.
- To: gcc-patches at gcc dot gnu dot org
- Subject: [PATCH] C++ patch to build the Java runtime with ENABLE_TREE_CHECKING.
- From: Alexandre Petit-Bianco <apbianco at cygnus dot com>
- Date: Tue, 20 Jun 2000 22:15:16 -0700
- Reply-to: apbianco at redhat dot com
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;