mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-21 10:13:03 +00:00
data/glr.c: Modify treatment of unused parameters to permit use
of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
|
||||||
|
|
||||||
|
* data/glr.c: Modify treatment of unused parameters to permit use
|
||||||
|
of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
|
||||||
|
|
||||||
2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
|
2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
|
||||||
|
|
||||||
Fix infringement on user name space reported by Janos Zoltan Szabo.
|
Fix infringement on user name space reported by Janos Zoltan Szabo.
|
||||||
|
|||||||
11
data/glr.c
11
data/glr.c
@@ -245,6 +245,13 @@ b4_syncline([@oline@], [@ofile@])
|
|||||||
# if !defined (__GNUC__) || __GNUC__ < 2 || \
|
# if !defined (__GNUC__) || __GNUC__ < 2 || \
|
||||||
(__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__
|
(__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__
|
||||||
# define __attribute__(Spec) /* empty */
|
# define __attribute__(Spec) /* empty */
|
||||||
|
# else
|
||||||
|
]b4_location_if([# define YYOPTIONAL_LOC(Name) Name],[
|
||||||
|
# if defined (__cplusplus)
|
||||||
|
# define YYOPTIONAL_LOC(Name) /* empty */
|
||||||
|
# else
|
||||||
|
# define YYOPTIONAL_LOC(Name) Name ATTRIBUTE_UNUSED
|
||||||
|
# endif])[
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -719,7 +726,7 @@ yyfill (yyGLRStackItem *yyvsp, int *yylow, int yylow1, yybool yynormal)
|
|||||||
static YYRESULTTAG
|
static YYRESULTTAG
|
||||||
yyuserAction (yyRuleNum yyn, int yyrhslen, yyGLRStackItem* yyvsp,
|
yyuserAction (yyRuleNum yyn, int yyrhslen, yyGLRStackItem* yyvsp,
|
||||||
YYSTYPE* yyvalp,
|
YYSTYPE* yyvalp,
|
||||||
YYLTYPE* yylocp]b4_location_if(, [ ATTRIBUTE_UNUSED])[,
|
YYLTYPE* YYOPTIONAL_LOC (yylocp),
|
||||||
yyGLRStack* yystack
|
yyGLRStack* yystack
|
||||||
]b4_user_formals[)
|
]b4_user_formals[)
|
||||||
{
|
{
|
||||||
@@ -1748,7 +1755,7 @@ yyreportSyntaxError (yyGLRStack* yystack,
|
|||||||
static void
|
static void
|
||||||
yyrecoverSyntaxError (yyGLRStack* yystack,
|
yyrecoverSyntaxError (yyGLRStack* yystack,
|
||||||
YYSTYPE* yylvalp,
|
YYSTYPE* yylvalp,
|
||||||
YYLTYPE* yyllocp]b4_location_if(, [ ATTRIBUTE_UNUSED])[
|
YYLTYPE* YYOPTIONAL_LOC (yyllocp)
|
||||||
]b4_user_formals[)
|
]b4_user_formals[)
|
||||||
{
|
{
|
||||||
yySymbol* const yytokenp = yystack->yytokenp;
|
yySymbol* const yytokenp = yystack->yytokenp;
|
||||||
|
|||||||
Reference in New Issue
Block a user