This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/32121] [4.1/4.2/4.3 Regression] C++ front-end accepts invalid __label__ declarations
- From: "jakub at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 Oct 2007 07:08:03 -0000
- Subject: [Bug c++/32121] [4.1/4.2/4.3 Regression] C++ front-end accepts invalid __label__ declarations
- References: <bug-32121-6528@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from jakub at gcc dot gnu dot org 2007-10-12 07:08 -------
Subject: Bug 32121
Author: jakub
Date: Fri Oct 12 07:07:46 2007
New Revision: 129253
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=129253
Log:
PR c++/32121
* parser.c (cp_parser_compound_statement): Handle label-declarations
at the beginning of the compound statement.
(cp_parser_block_declaration): Issue diagnostics about __label__
not at the beginning of a block.
* g++.dg/ext/label4.C: Adjust error regexp.
* g++.dg/ext/label6.C: Adjust error regexp.
* g++.dg/ext/label7.C: New test.
* g++.dg/ext/label8.C: New test.
* g++.dg/ext/label9.C: New test.
Added:
trunk/gcc/testsuite/g++.dg/ext/label7.C
trunk/gcc/testsuite/g++.dg/ext/label8.C
trunk/gcc/testsuite/g++.dg/ext/label9.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/parser.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/g++.dg/ext/label4.C
trunk/gcc/testsuite/g++.dg/ext/label6.C
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32121