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]
Other format: [Raw text]

[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


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