------- Comment #2 from joseph at codesourcery dot com 2009-08-07 17:24 ------- Subject: Re: New: alloca broken for -fno-builtin
On Fri, 7 Aug 2009, ktietz at gcc dot gnu dot org wrote: > The function alloca (for cygwin/mingw target _alloca) is broken or not > available (for linux64), when using option -fno-builtin. It is in the nature of alloca that it needs to be built in to the compiler for an effective implementation, and the lack of a library emulation (using malloc) is nothing to do with the compiler. Why do you think there is a bug here? > The linux and win32 targets the symbol alloca isn't present. For windows > targets there is an implementation (_alloca) in gcc/config/i386/cygwin.asm > present. But when using this, the stack layout is broken after calling alloca. I do not believe _alloca is meant to be an implementation of the C alloca function; if it was, it would be alloca not _alloca. Do you have any reason to believe _alloca does not follow its specification of making stack space available when called implicitly by the compiler (*not* an explicit C function call - it has its own special ABI so you can't call it explicitly from C)? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41001