[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
alloca
From: |
Hans Aberg |
Subject: |
alloca |
Date: |
Sun, 9 Sep 2001 12:53:38 +0200 |
I assume that the work on Bison 1.29a already has begun.
I suggest that one change the skeleton file so that one can choose whether
to use alloca or not. -- The function alloca() is considered as a low level
hack, and it does not work under some circumstances (like in function
wrapping, often used in C++, or if the parameter stack has limits on it).
One point of this is that the "#ifdef YYSTACK_USE_ALLOCA" mess in the
bison.simple file" might be simplified.
I added to my bison.simple:
#ifdef YYSTACK_USE_ALLOCA
# include <alloca.h>
#endif
Then as the "#ifdef YYSTACK_USE_ALLOCA" mess in the bison.simple file does
is used on my platform, I can choose whether to use alloca by inserting in
my .y file
#define YYSTACK_USE_ALLOCA 1
I have to define this to 1, because the bison.simple file forgets to use
#ifdef instead of #if at one place. If think this should be change too, so
that one can merely write
#define YYSTACK_USE_ALLOCA
just as one can write
#define YYERROR_VERBOSE
Hans Aberg