re PR c/54355 (ICE on invalid code in switch statement)
PR c/54355 * c-decl.c (c_parser_label): Pass true as nested and fix up comments for nested and empty_ok arguments in the call to c_parser_declaration_or_fndef. * gcc.dg/pr54355.c: New test. From-SVN: r190656
This commit is contained in:
parent
12fdc0990f
commit
6265d07ce0
@ -1,3 +1,10 @@
|
||||
2012-08-24 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c/54355
|
||||
* c-decl.c (c_parser_label): Pass true as nested and fix up comments
|
||||
for nested and empty_ok arguments in the call to
|
||||
c_parser_declaration_or_fndef.
|
||||
|
||||
2012-08-17 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* c-tree.h (c_last_sizeof_arg): Declare.
|
||||
|
@ -4327,7 +4327,7 @@ c_parser_label (c_parser *parser)
|
||||
"a declaration is not a statement");
|
||||
c_parser_declaration_or_fndef (parser, /*fndef_ok*/ false,
|
||||
/*static_assert_ok*/ true,
|
||||
/*nested*/ true, /*empty_ok*/ false,
|
||||
/*empty_ok*/ true, /*nested*/ true,
|
||||
/*start_attr_ok*/ true, NULL);
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,8 @@
|
||||
2012-08-24 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c/54355
|
||||
* gcc.dg/pr54355.c: New test.
|
||||
|
||||
2012-08-24 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
PR debug/52857
|
||||
|
11
gcc/testsuite/gcc.dg/pr54355.c
Normal file
11
gcc/testsuite/gcc.dg/pr54355.c
Normal file
@ -0,0 +1,11 @@
|
||||
/* PR c/54355 */
|
||||
/* { dg-do compile } */
|
||||
|
||||
void
|
||||
foo (int i)
|
||||
{
|
||||
switch (i)
|
||||
{
|
||||
case 0: T x > /* { dg-error "(label|unknown type|expected)" } */
|
||||
}
|
||||
} /* { dg-error "expected" } */
|
Loading…
Reference in New Issue
Block a user