[tremor] Re: [PATCH] eliminate alloca() usage

Michael Smith msmith at labyrinth.net.au
Thu Oct 17 03:36:29 PDT 2002



At 11:40 AM 10/17/02 +0200, you wrote:
>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA1
>
>On 2002-10-17 at 05:38:51 Nicolas Pitre wrote:
>
>NP> Anybody with another compiler than GCC please confirm if the attached
>NP> patch works for you or not.
>
>This will only work with GCC, since it is a GCC specific extension. It
>is definitely not ANSI or ISO C. (Note that I agree that it is a very
>handy feature, which almost entirely removes the need for an alloca()
>function.)

Whilst it was at one time a GCC (and other compilers, though far from all
of them) extension, it's been part of ANSI C for a few years now. C99
introduces variable-size automatic arrays, so any compiler that supports
C99 will work with this. alloca() is more portable in practice, though,
this was only suggested as an alternative for people without alloca().

Michael

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'tremor-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Tremor mailing list