diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-03-23 22:59:18 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-03-23 22:59:18 +0000 |
commit | 8c866b45aac0decda72b72e54c31a41996f6b473 (patch) | |
tree | 6efc2323844d0a320c4bbb2d9ba8cc52342a73a6 /gcc/c-parse.in | |
parent | 2b63b35121b02d09892ec150dcb4a5b481d7f6d6 (diff) | |
download | gcc-8c866b45aac0decda72b72e54c31a41996f6b473.tar.gz |
* c-parse.in: Recognize protocol qualifiers in class
definitions for objc.
Include "output.h".
(yyerror): Remove redundant decl.
(yyprint): Fix prototype.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@18788 138bc75d-0d04-0410-961f-82ee72b054a4
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 |