bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-gnulib] Re: getdate don't need alloca


From: Simon Josefsson
Subject: [bug-gnulib] Re: getdate don't need alloca
Date: Fri, 17 Dec 2004 23:38:06 +0100
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux)

Bruno Haible <address@hidden> writes:

> Simon Josefsson wrote:
>> Would wrapping the #include inside a #if HAVE_ALLOCA test work?
>
> Probably yes. But gnulib is generally going into the opposite direction:
> Move the #ifs from the .c file that uses the header into the header itself,
> in this case by use of a substitute for alloca.h.

Ok.

So could getdate depend on alloca-opt instead of alloca?

Or is alloca.h required for bison 1.30 generated output to compile?  I
looked at output from bison 1.35, and it seemed to only optionally use
alloca, when YYSTACK_USE_ALLOCA was defined.  Presumably the user
would have to define YYSTACK_USE_ALLOCA elsewhere, such as in CFLAGS
or in config.h.  getdate.y doesn't set it, as far as I can tell.  The
code seemed to fall back on malloc+free if YYSTACK_USE_ALLOCA was not
enabled.

So it seems to me that using alloca-opt would have no bad effects

Maybe 1.30 was different, though...

Thanks.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]