From b929851a33abe7f23de15cdb60d63be4a8bbc0a0 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 28 Apr 2003 06:03:58 +0000 Subject: [PATCH] Avoid gcc -Wundef warnings reported by Gerald Pfeifer in . (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA if it is not defined. (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined. --- data/yacc.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/data/yacc.c b/data/yacc.c index eb0b7b30..d2a3c558 100644 --- a/data/yacc.c +++ b/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 -- 2.49.0