[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: alloca patch
From: |
Patrick Welche |
Subject: |
Re: alloca patch |
Date: |
Fri, 21 Dec 2012 17:51:16 +0000 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Fri, Dec 21, 2012 at 09:32:43AM -0800, Paul Eggert wrote:
> On 12/21/12 09:14, Patrick Welche wrote:
> > In the documentation case, if you don't HAVE_ALLOCA, why declare alloca()?
>
> The idea is that you're supplying a substitute,
> a la the gnulib alloca module. (If you're not,
> the alloca declaration shouldn't hurt anything.)
>
> > In the AC_FUNC_ALLOCA case, why look for a function which isn't declared
> > in a public header nor is one of the builtins of the compilers you know
> > about?
>
> Partly because that mimics the documentation better.
> Partly because that's what Autoconf has done for years
> and I couldn't think of a reason to change it.
>
> > I can still see this failing in a slightly contrived way: imagine not having
> > an alloca which is a macro, but which is a real function. My stdlib.h will
> > then declare alloca(). The test in AC_FUNC_ALLOCA will then decare alloca
> > again in the fall through case.
>
> In that case, the second declaration should be harmless,
> as C allows redundant external function declarations.
Thank you for the fix and explanation!
Cheers,
Patrick