diff options
Diffstat (limited to 'gcc/c-parse.in')
-rw-r--r-- | gcc/c-parse.in | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/gcc/c-parse.in b/gcc/c-parse.in index 47a3e29a536..c8705576243 100644 --- a/gcc/c-parse.in +++ b/gcc/c-parse.in @@ -69,6 +69,7 @@ end ifc #include "c-lex.h" #include "c-tree.h" #include "flags.h" +#include "output.h" #ifdef MULTIBYTE_CHARS #include <stdlib.h> @@ -92,8 +93,6 @@ end ifc extern int errno; #endif -void yyerror (); - /* Like YYERROR but do call yyerror. */ #define YYERROR1 { yyerror ("syntax error"); YYERROR; } @@ -270,7 +269,7 @@ end ifobjc /* Tell yyparse how to print a token's value, if yydebug is set. */ #define YYPRINT(FILE,YYCHAR,YYLVAL) yyprint(FILE,YYCHAR,YYLVAL) -extern void yyprint (); +extern void yyprint PROTO ((FILE *, int, YYSTYPE)); %} %% @@ -2726,20 +2725,28 @@ semi_or_error: methodproto: '+' { + /* Remember protocol qualifiers in prototypes. */ + remember_protocol_qualifiers (); objc_inherit_code = CLASS_METHOD_DECL; } methoddecl { + /* Forget protocol qualifiers here. */ + forget_protocol_qualifiers (); add_class_method (objc_interface_context, $3); } semi_or_error | '-' { + /* Remember protocol qualifiers in prototypes. */ + remember_protocol_qualifiers (); objc_inherit_code = INSTANCE_METHOD_DECL; } methoddecl { + /* Forget protocol qualifiers here. */ + forget_protocol_qualifiers (); add_instance_method (objc_interface_context, $3); } semi_or_error |