autoconf-patches
[Top][All Lists]
Advanced

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

Re: alloca patch


From: Paul Eggert
Subject: Re: alloca patch
Date: Fri, 21 Dec 2012 09:32:43 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0

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.




reply via email to

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