mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 04:13:03 +00:00
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:
20
data/yacc.c
20
data/yacc.c
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user