From: Paul Eggert Date: Wed, 18 Dec 1996 02:18:10 +0000 (+0000) Subject: (yyparse): If __GNUC__ and YYPARSE_PARAM are both defined, X-Git-Tag: GNU_ORIG~19 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1b1816515e9b62c36589d3bd69e736fe51b029f9;p=platform%2Fupstream%2Fbison.git (yyparse): If __GNUC__ and YYPARSE_PARAM are both defined, declare yyparse to have a void * argument. --- diff --git a/bison.simple b/bison.simple index 22e9944..2c2d0a2 100644 --- a/bison.simple +++ b/bison.simple @@ -149,11 +149,6 @@ int yydebug; /* nonzero means print parse trace */ #ifndef YYMAXDEPTH #define YYMAXDEPTH 10000 #endif - -/* Prevent warning if -Wstrict-prototypes. */ -#ifdef __GNUC__ -int yyparse (void); -#endif #if __GNUC__ > 1 /* GNU C and GNU C++ define this. */ #define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT) @@ -215,6 +210,15 @@ __yy_memcpy (char *to, char *from, int count) #define YYPARSE_PARAM_DECL #endif /* not YYPARSE_PARAM */ +/* Prevent warning if -Wstrict-prototypes. */ +#ifdef __GNUC__ +#ifdef YYPARSE_PARAM +int yyparse (void *); +#else +int yyparse (void); +#endif +#endif + int yyparse(YYPARSE_PARAM_ARG) YYPARSE_PARAM_DECL diff --git a/src/bison.s1 b/src/bison.s1 index 22e9944..2c2d0a2 100644 --- a/src/bison.s1 +++ b/src/bison.s1 @@ -149,11 +149,6 @@ int yydebug; /* nonzero means print parse trace */ #ifndef YYMAXDEPTH #define YYMAXDEPTH 10000 #endif - -/* Prevent warning if -Wstrict-prototypes. */ -#ifdef __GNUC__ -int yyparse (void); -#endif #if __GNUC__ > 1 /* GNU C and GNU C++ define this. */ #define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT) @@ -215,6 +210,15 @@ __yy_memcpy (char *to, char *from, int count) #define YYPARSE_PARAM_DECL #endif /* not YYPARSE_PARAM */ +/* Prevent warning if -Wstrict-prototypes. */ +#ifdef __GNUC__ +#ifdef YYPARSE_PARAM +int yyparse (void *); +#else +int yyparse (void); +#endif +#endif + int yyparse(YYPARSE_PARAM_ARG) YYPARSE_PARAM_DECL diff --git a/src/bison.simple b/src/bison.simple index 22e9944..2c2d0a2 100644 --- a/src/bison.simple +++ b/src/bison.simple @@ -149,11 +149,6 @@ int yydebug; /* nonzero means print parse trace */ #ifndef YYMAXDEPTH #define YYMAXDEPTH 10000 #endif - -/* Prevent warning if -Wstrict-prototypes. */ -#ifdef __GNUC__ -int yyparse (void); -#endif #if __GNUC__ > 1 /* GNU C and GNU C++ define this. */ #define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT) @@ -215,6 +210,15 @@ __yy_memcpy (char *to, char *from, int count) #define YYPARSE_PARAM_DECL #endif /* not YYPARSE_PARAM */ +/* Prevent warning if -Wstrict-prototypes. */ +#ifdef __GNUC__ +#ifdef YYPARSE_PARAM +int yyparse (void *); +#else +int yyparse (void); +#endif +#endif + int yyparse(YYPARSE_PARAM_ARG) YYPARSE_PARAM_DECL