+2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
+
+ * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
+ it itself.
+ * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
+ don't use alloca any more.
+
+ * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
+ __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
+ (defined alloca || defined _ALLOCA_H)]: Don't include <stdlib.h>;
+ not needed in this case.
+ * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
+ to match yacc.c, to test more hosts.
+
2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
* data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
<$GNULIB_SRCDIR/gnulib-tool || exit
gnulib_modules='
-alloca
argmatch
dirname
error
# define alloca _alloca
# else
# define YYSTACK_ALLOC alloca
-# if ! defined (_STDLIB_H) && (defined (__STDC__) || defined (__cplusplus))
+# if (! defined (alloca) && ! defined (_ALLOCA_H) && ! defined (_STDLIB_H) \
+ && (defined (__STDC__) || defined (__cplusplus)))
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
# ifndef _STDLIB_H
# define _STDLIB_H 1
scanner_free ();
muscle_free ();
uniqstrs_free ();
- /* If using alloca.c, flush the alloca'ed memory for the benefit of
- people running Bison as a library in IDEs. */
-#if C_ALLOCA
- {
- extern void *alloca (size_t);
- alloca (0);
- }
-#endif
timevar_pop (TV_FREE);
if (trace_flag & trace_bitsets)
AT_SETUP([Exploding the Stack Size with Alloca])
AT_DATA_STACK_TORTURE([[
-#if defined __GNUC__ || defined alloca
+#if (defined __GNUC__ || defined __BUILTIN_VA_ARG_INCR \
+ || defined _AIX || defined _MSC_VER || defined alloca || defined _ALLOCA_H)
# define YYSTACK_USE_ALLOCA 1
#endif
]])