This is the mail archive of the
automake@gnu.org
mailing list for the automake project.
Re: turn off putting flex/bison output in distfile?
- From: Akim Demaille <akim at epita dot fr>
- To: <dickey at herndon4 dot his dot com>
- Cc: Alexandre Duret-Lutz <duret_g at lrde dot epita dot fr>, <mcmahill at mtl dot mit dot edu>, <automake at gnu dot org>
- Date: 25 Jul 2002 14:29:15 +0200
- Subject: Re: turn off putting flex/bison output in distfile?
- References: <Pine.BSI.4.33.0207250745100.8379-100000@herndon4.his.com>
>>>>> "Thomas" == Thomas E Dickey <dickey@herndon4.his.com> writes:
Thomas> bison relies on alloca, which is not standard.
There are two meaning of `relies alloca':
- bison.exe uses alloca
but has the machinery to emulate it when missing.
No problem was ever reported.
- the parsers it outputs use alloca
Recent versions of Bison uses alloca *only* when obviously
usable (the *user* included alloca.h, or uses GCC).
/* The parser invokes alloca or malloc; define the necessary symbols. */
# if YYSTACK_USE_ALLOCA
# define YYSTACK_ALLOC alloca
# else
# ifndef YYSTACK_USE_ALLOCA
# if defined (alloca) || defined (_ALLOCA_H)
# define YYSTACK_ALLOC alloca
# else
# ifdef __GNUC__
# define YYSTACK_ALLOC __builtin_alloca
# endif
# endif
# endif
# endif
# ifdef YYSTACK_ALLOC
/* Pacify GCC's `empty if-body' warning. */
# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
# else
# if defined (__STDC__) || defined (__cplusplus)
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
# define YYSIZE_T size_t
# endif
# define YYSTACK_ALLOC malloc
# define YYSTACK_FREE free
# endif
So I think your legitimate point no longer holds. And for those who
don't trust these conditions, #defining YYSTACK_USE_ALLOCA to 0
definitely settles the matter.