From e3cd9945cbe33d50af459b6b4951d3dcb12a33f7 Mon Sep 17 00:00:00 2001 From: Alexandre Petit-Bianco Date: Wed, 21 Jun 2000 18:18:11 +0000 Subject: [PATCH] class.c (push_lang_context): TYPE_NAME gets you to the Java types DECLs. 2000-06-20 Alexandre Petit-Bianco * class.c (push_lang_context): TYPE_NAME gets you to the Java types DECLs. * decl.c (check_goto): Computed gotos assumed OK. From-SVN: r34635 --- gcc/cp/ChangeLog | 6 ++++++ gcc/cp/class.c | 16 ++++++++-------- gcc/cp/decl.c | 5 +++++ 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index f5b4c318f5a..0699f1505a0 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2000-06-20 Alexandre Petit-Bianco + + * class.c (push_lang_context): TYPE_NAME gets you to the Java + types DECLs. + * decl.c (check_goto): Computed gotos assumed OK. + 2000-06-20 Jason Merrill * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs diff --git a/gcc/cp/class.c b/gcc/cp/class.c index 33f12b56b54..387451c5439 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -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) { diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 3e949b8489c..9e06a48be1a 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -5024,6 +5024,11 @@ check_goto (decl) tree bad; struct named_label_list *lab; + /* We can't know where a computed goto is jumping. So we assume + that it's OK. */ + if (! DECL_P (decl)) + return; + /* If the label hasn't been defined yet, defer checking. */ if (! DECL_INITIAL (decl)) {