aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/c-parser.c')
-rw-r--r--gcc/c-parser.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/c-parser.c b/gcc/c-parser.c
index 268fa90..ce03569 100644
--- a/gcc/c-parser.c
+++ b/gcc/c-parser.c
@@ -5723,6 +5723,11 @@ c_parser_objc_method_definition (c_parser *parser)
if (pedantic)
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_start_method_definition (decl);
add_stmt (c_parser_compound_statement (parser));