(ATTRIBUTE_UNUSED): Remove, since it infringes on

the user's name space.  All uses changed to __attribute__
((__unused__)).
(yyFail, yyMemoryExhausted, yyreportAmbiguity):
Add __attribute__ ((__noreturn__)).
This commit is contained in:
Paul Eggert
2005-07-24 07:17:06 +00:00
parent f938a7e7b8
commit 135bc829bd

View File

@@ -269,7 +269,7 @@ b4_syncline([@oline@], [@ofile@])
# if defined (__cplusplus) # if defined (__cplusplus)
# define YYOPTIONAL_LOC(Name) /* empty */ # define YYOPTIONAL_LOC(Name) /* empty */
# else # else
# define YYOPTIONAL_LOC(Name) Name ATTRIBUTE_UNUSED # define YYOPTIONAL_LOC(Name) Name __attribute__ ((__unused__))
# endif])[ # endif])[
# endif # endif
#endif #endif
@@ -278,10 +278,6 @@ b4_syncline([@oline@], [@ofile@])
# define YYASSERT(condition) ((void) ((condition) || (abort (), 0))) # define YYASSERT(condition) ((void) ((condition) || (abort (), 0)))
#endif #endif
#ifndef ATTRIBUTE_UNUSED
# define ATTRIBUTE_UNUSED __attribute__ ((__unused__))
#endif
/* YYFINAL -- State number of the termination state. */ /* YYFINAL -- State number of the termination state. */
#define YYFINAL ]b4_final_state_number[ #define YYFINAL ]b4_final_state_number[
/* YYLAST -- Last index in YYTABLE. */ /* YYLAST -- Last index in YYTABLE. */
@@ -742,6 +738,8 @@ struct yyGLRStack {
static void yyexpandGLRStack (yyGLRStack* yystack); static void yyexpandGLRStack (yyGLRStack* yystack);
static void yyFail (yyGLRStack* yystack]b4_pure_formals[, const char* yymsg)
__attribute__ ((__noreturn__));
static void static void
yyFail (yyGLRStack* yystack]b4_pure_formals[, const char* yymsg) yyFail (yyGLRStack* yystack]b4_pure_formals[, const char* yymsg)
{ {
@@ -750,6 +748,8 @@ yyFail (yyGLRStack* yystack]b4_pure_formals[, const char* yymsg)
longjmp (yystack->yyexception_buffer, 1); longjmp (yystack->yyexception_buffer, 1);
} }
static void yyMemoryExhausted (yyGLRStack* yystack)
__attribute__ ((__noreturn__));
static void static void
yyMemoryExhausted (yyGLRStack* yystack) yyMemoryExhausted (yyGLRStack* yystack)
{ {
@@ -772,7 +772,7 @@ yytokenName (yySymbol yytoken)
* at YYVSP[YYLOW0].yystate.yypred. Leaves YYVSP[YYLOW1].yystate.yypred * at YYVSP[YYLOW0].yystate.yypred. Leaves YYVSP[YYLOW1].yystate.yypred
* containing the pointer to the next state in the chain. Assumes * containing the pointer to the next state in the chain. Assumes
* YYLOW1 < YYLOW0. */ * YYLOW1 < YYLOW0. */
static void yyfillin (yyGLRStackItem *, int, int) ATTRIBUTE_UNUSED; static void yyfillin (yyGLRStackItem *, int, int) __attribute__ ((__unused__));
static void static void
yyfillin (yyGLRStackItem *yyvsp, int yylow0, int yylow1) yyfillin (yyGLRStackItem *yyvsp, int yylow0, int yylow1)
{ {
@@ -793,7 +793,7 @@ yyfillin (yyGLRStackItem *yyvsp, int yylow0, int yylow1)
YYVSP[YYLOW1 .. *YYLOW-1] as in yyfillin and set *YYLOW = YYLOW1. YYVSP[YYLOW1 .. *YYLOW-1] as in yyfillin and set *YYLOW = YYLOW1.
For convenience, always return YYLOW1. */ For convenience, always return YYLOW1. */
static inline int yyfill (yyGLRStackItem *, int *, int, yybool) static inline int yyfill (yyGLRStackItem *, int *, int, yybool)
ATTRIBUTE_UNUSED; __attribute__ ((__unused__));
static inline int static inline int
yyfill (yyGLRStackItem *yyvsp, int *yylow, int yylow1, yybool yynormal) yyfill (yyGLRStackItem *yyvsp, int *yylow, int yylow1, yybool yynormal)
{ {
@@ -817,7 +817,8 @@ yyuserAction (yyRuleNum yyn, int yyrhslen, yyGLRStackItem* yyvsp,
yyGLRStack* yystack yyGLRStack* yystack
]b4_user_formals[) ]b4_user_formals[)
{ {
yybool yynormal ATTRIBUTE_UNUSED = (yystack->yysplitPoint == NULL); yybool yynormal __attribute__ ((__unused__)) =
(yystack->yysplitPoint == NULL);
int yylow; int yylow;
# undef yyerrok # undef yyerrok
@@ -1575,6 +1576,9 @@ yyreportTree (yySemanticOption* yyx, int yyindent)
} }
#endif #endif
static void yyreportAmbiguity (yySemanticOption* yyx0, yySemanticOption* yyx1,
yyGLRStack* yystack]b4_pure_formals[)
__attribute__ ((__noreturn__));
static void static void
yyreportAmbiguity (yySemanticOption* yyx0, yySemanticOption* yyx1, yyreportAmbiguity (yySemanticOption* yyx0, yySemanticOption* yyx1,
yyGLRStack* yystack]b4_pure_formals[) yyGLRStack* yystack]b4_pure_formals[)
@@ -2188,8 +2192,9 @@ b4_syncline([@oline@], [@ofile@])])dnl
/* DEBUGGING ONLY */ /* DEBUGGING ONLY */
#ifdef YYDEBUG #ifdef YYDEBUG
static void yypstack (yyGLRStack* yystack, size_t yyk) ATTRIBUTE_UNUSED; static void yypstack (yyGLRStack* yystack, size_t yyk)
static void yypdumpstack (yyGLRStack* yystack) ATTRIBUTE_UNUSED; __attribute__ ((__unused__));
static void yypdumpstack (yyGLRStack* yystack) __attribute__ ((__unused__));
static void static void
yy_yypstack (yyGLRState* yys) yy_yypstack (yyGLRState* yys)