summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsteven <steven@138bc75d-0d04-0410-961f-82ee72b054a4>2003-09-06 15:44:34 +0000
committersteven <steven@138bc75d-0d04-0410-961f-82ee72b054a4>2003-09-06 15:44:34 +0000
commit91a39dda19a6b809bb15897a6d04d0ba8a64b91c (patch)
tree78a855038664b00d74ef9e6d943946875e5047f4
parent550744329ce97be0ff7fe03330266c915499bf24 (diff)
downloadppe42-gcc-91a39dda19a6b809bb15897a6d04d0ba8a64b91c.tar.gz
ppe42-gcc-91a39dda19a6b809bb15897a6d04d0ba8a64b91c.zip
PR c++/11595
* decl.c (define_label): Remove unreachable timevar pop. Always return the decl, even if the definition is invalid. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@71138 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/decl.c11
2 files changed, 10 insertions, 7 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 4926d58349f..49782e3f3b1 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,9 @@
+2003-09-06 Steven Bosscher <steven@gcc.gnu.org>
+
+ PR c++/11595
+ * decl.c (define_label): Remove unreachable timevar pop.
+ Always return the decl, even if the definition is invalid.
+
2003-09-06 Nathan Sidwell <nathan@codesourcery.com>
PR c++/12167
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 1575ec4dbf1..c11a7c57404 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -4937,8 +4937,7 @@ check_goto (tree decl)
}
/* Define a label, specifying the location in the source file.
- Return the LABEL_DECL node for the label, if the definition is valid.
- Otherwise return 0. */
+ Return the LABEL_DECL node for the label. */
tree
define_label (location_t location, tree name)
@@ -4961,10 +4960,7 @@ define_label (location_t location, tree name)
pedwarn ("label named wchar_t");
if (DECL_INITIAL (decl) != NULL_TREE)
- {
- error ("duplicate label `%D'", decl);
- POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, NULL_TREE);
- }
+ error ("duplicate label `%D'", decl);
else
{
/* Mark label as having been defined. */
@@ -4977,9 +4973,10 @@ define_label (location_t location, tree name)
ent->binding_level = current_binding_level;
}
check_previous_gotos (decl);
- POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, decl);
}
+
timevar_pop (TV_NAME_LOOKUP);
+ return decl;
}
struct cp_switch
OpenPOWER on IntegriCloud