Do these macros really belong in system headers? The builtin alloca may be what we want most of the time. But what if we really want to use our own alloca() (or the one in libiberty.a?). Right, we put in another guard:
#if defined (__GNUC__) && ! defined (USE_C_ALLOCA)
IMHO, best leave these redefinitions of alloca to specific projects. Configure scripts have been doing this for a long time. (look no further than the mingw-runtime configure).
Yes, both GNU-based systems and MSVC work like this way.
In fact, mingw itself has been working this way, because alloca is builtin by default.
Anytime when you don't want those non-ANSI stuff, you can use '-ansi' to gcc.
I don't believe people really want to use C implementation of alloca.
(it's not a true alloca, and mingw-built libiberty.a does NOT have alloca, because mingw has working alloca in gcc)
configure scripts have been just leaving a line '#define HAVE_ALLOCA 1' for me.
I have postponed this patch to allow Mumit more time to review it and fix bugs in libgcc.a wrt alloca.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.