This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[C++ PATCH] PR
- From: Steven Bosscher <s dot bosscher at student dot tudelft dot nl>
- To: gcc-patches at gcc dot gnu dot org
- Date: 01 Aug 2003 12:25:51 +0200
- Subject: [C++ PATCH] PR
Could it really be this easy?
2003-08-01 Steven Bosscher <steven@gcc.gnu.org>
Bug 11595
* semantics.c (finish_label_stmt): If define_label fails, do
not add a LABEL_STMT.
Index: semantics.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/semantics.c,v
retrieving revision 1.338
diff -c -3 -p -r1.338 semantics.c
*** semantics.c 29 Jul 2003 01:57:47 -0000 1.338
--- semantics.c 29 Jul 2003 11:20:21 -0000
*************** tree
*** 1139,1145 ****
finish_label_stmt (tree name)
{
tree decl = define_label (input_location, name);
! return add_stmt (build_stmt (LABEL_STMT, decl));
}
/* Finish a series of declarations for local labels. G++ allows users
--- 1139,1148 ----
finish_label_stmt (tree name)
{
tree decl = define_label (input_location, name);
! if (decl)
! return add_stmt (build_stmt (LABEL_STMT, decl));
! else
! return error_mark_node;
}
/* Finish a series of declarations for local labels. G++ allows users