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] |
The problem here is that we are doing worse error recovery from a parse error than we did with the old parser. This simple patch fixes the issue. This patch makes us return if we don't have a '{' after the method definition.
Thanks, Andrew Pinski
ChangeLog: * c-parser.c (c_parser_objc_method_definition): If the next token is not "{", error out and don't start the function.
testsuite: * objc.dg/error-1.m: New test.
Attachment:
t1.diff.txt
Description: Text document
Attachment:
error-1.m
Description: Binary data
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |