Subject: Re: compiling -std=c99 on cobalt fails with alloca
To: Kristaps Johnson <>
From: Jason Thorpe <>
List: port-cobalt
Date: 08/28/2006 20:52:49
On Aug 28, 2006, at 11:22 AM, Kristaps Johnson wrote:

> But when compiled as such:
> $ gcc -std=c99 foo.c
> /var/tmp//cc9lV8g8.o(.text+0x28): In function `main':
> : undefined reference to `alloca'

This is because alloca() is not in the C99 standard, and so GCC takes  
it out of the namespace when you compile for C99 (alloca() is a built- 
in GCC function; __builtin_alloca() should always work).

If you use -std=gnu99, does it work?

-- thorpej