Avoid gcc -Wundef warnings reported by Gerald Pfeifer in

<http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
(YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA if it is not defined.
(YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
This commit is contained in:
Paul Eggert
2003-04-28 06:03:58 +00:00
parent 3470c57bea
commit b929851a33

View File

@@ -218,16 +218,16 @@ b4_syncline([@oline@], [@ofile@])[
/* The parser invokes alloca or malloc; define the necessary symbols. */
# if YYSTACK_USE_ALLOCA
# define YYSTACK_ALLOC alloca
# ifdef YYSTACK_USE_ALLOCA
# if YYSTACK_USE_ALLOCA
# define YYSTACK_ALLOC alloca
# endif
# else
# ifndef YYSTACK_USE_ALLOCA
# if defined (alloca) || defined (_ALLOCA_H)
# define YYSTACK_ALLOC alloca
# else
# ifdef __GNUC__
# define YYSTACK_ALLOC __builtin_alloca
# endif
# if defined (alloca) || defined (_ALLOCA_H)
# define YYSTACK_ALLOC alloca
# else
# ifdef __GNUC__
# define YYSTACK_ALLOC __builtin_alloca
# endif
# endif
# endif
@@ -622,7 +622,7 @@ int yydebug;
SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
evaluated with infinite-precision integer arithmetic. */
#if YYMAXDEPTH == 0
#if defined (YYMAXDEPTH) && YYMAXDEPTH == 0
# undef YYMAXDEPTH
#endif