re PR objc/20574 (weird error message after a parse error)
2005-09-08 Andrew Pinski <pinskia@physics.uc.edu> PR objc/20574 PR objc/19324 * c-parser.c (c_parser_objc_method_definition): If the next token is not "{", error out and don't start the function. 2005-09-08 Andrew Pinski <pinskia@physics.uc.edu> PR objc/20574 PR objc/19324 * objc.dg/error-1.m: New test. From-SVN: r104032
This commit is contained in:
parent
8aeca7fda0
commit
8f078c0837
|
@ -1,3 +1,10 @@
|
||||||
|
2005-09-08 Andrew Pinski <pinskia@physics.uc.edu>
|
||||||
|
|
||||||
|
PR objc/20574
|
||||||
|
PR objc/19324
|
||||||
|
* c-parser.c (c_parser_objc_method_definition): If the next
|
||||||
|
token is not "{", error out and don't start the function.
|
||||||
|
|
||||||
2005-09-08 Andrew Pinski <pinskia@physics.uc.edu>
|
2005-09-08 Andrew Pinski <pinskia@physics.uc.edu>
|
||||||
|
|
||||||
* tree-vrp.c (extract_range_from_expr): Move the check for non
|
* tree-vrp.c (extract_range_from_expr): Move the check for non
|
||||||
|
|
|
@ -5723,6 +5723,11 @@ c_parser_objc_method_definition (c_parser *parser)
|
||||||
if (pedantic)
|
if (pedantic)
|
||||||
pedwarn ("extra semicolon in method definition specified");
|
pedwarn ("extra semicolon in method definition specified");
|
||||||
}
|
}
|
||||||
|
if (!c_parser_next_token_is (parser, CPP_OPEN_BRACE))
|
||||||
|
{
|
||||||
|
c_parser_error (parser, "expected %<{%>");
|
||||||
|
return;
|
||||||
|
}
|
||||||
objc_pq_context = 0;
|
objc_pq_context = 0;
|
||||||
objc_start_method_definition (decl);
|
objc_start_method_definition (decl);
|
||||||
add_stmt (c_parser_compound_statement (parser));
|
add_stmt (c_parser_compound_statement (parser));
|
||||||
|
|
|
@ -1,3 +1,9 @@
|
||||||
|
2005-09-08 Andrew Pinski <pinskia@physics.uc.edu>
|
||||||
|
|
||||||
|
PR objc/20574
|
||||||
|
PR objc/19324
|
||||||
|
* objc.dg/error-1.m: New test.
|
||||||
|
|
||||||
2005-09-07 Richard Sandiford <richard@codesourcery.com>
|
2005-09-07 Richard Sandiford <richard@codesourcery.com>
|
||||||
|
|
||||||
PR fortran/23373
|
PR fortran/23373
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
/* { dg-options "-w" } */
|
||||||
|
/* { dg-do compile } */
|
||||||
|
@implementation A
|
||||||
|
+B
|
||||||
|
+C {} /* { dg-error "expected '\{' before '\\\+' token" } */
|
||||||
|
@end
|
Loading…
Reference in New Issue