Subject: Re: compiling -std=c99 on cobalt fails with alloca
To: Jason Thorpe <firstname.lastname@example.org>
From: Kristaps Johnson <email@example.com>
Date: 08/29/2006 15:15:07
-----BEGIN PGP SIGNED MESSAGE-----
>> 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 NetBSD/cobalt (same with pmax - maybe all mipsel?) doesn't compile
$ gcc -std=c99 foo.c
(with the aforementioned alloca() call in foo.c)
...while NetBSD/i386 (and OpenBSD/i386, etc) does, then somebody has an
error. I see that you've commented on this in the past; would you call
this a bug on the other systems viz. conformance to c99?
On a related note, shouldn't this bail on compilation, and not on linking?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
-----END PGP SIGNATURE-----