[Cs-dev] alloca
| Date | 2008-01-22 16:39 |
| From | "Steven Yi" |
| Subject | [Cs-dev] alloca |
| Attachments | None |
| Date | 2008-01-22 21:25 |
| From | jpff |
| Subject | Re: [Cs-dev] alloca |
alloca is not in C89 which is the dialect I use. It may be in C99, but lots of nasties are there.....(ducks, runs for cover) ==John ffitch ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
| Date | 2008-01-22 22:50 |
| From | Erik de Castro Lopo |
| Subject | Re: [Cs-dev] alloca |
jpff wrote:
> alloca is not in C89 which is the dialect I use. It may be in C99,
Alloca is not in any ISO C standard nor is it in POSIX. Furthermore,
the Linux manpage says:
The alloca() function is machine and compiler dependent. On many
systems its implementation is buggy. Its use is discouraged.
On many systems alloca() cannot be used inside the list of
arguments of a function call, because the stack space reserved by
alloca() would appear on the stack in the middle of the space
for the function arguments.
> but lots of nasties are there.....(ducks, runs for cover)
In C99? Like what?
AFAIAC, C99 brings a lot of really good stuff like snprintf (sprintf
should be avoided), inline functions, the "long long" type, named
initialisation of structs, functions returns no longer default to int
and a bunch of other good stuff.
Erik
--
-----------------------------------------------------------------
Erik de Castro Lopo
-----------------------------------------------------------------
"In civilian equipment, such as computers, the number
of components alone makes miniaturization essential if
the computer is to be housed in a reasonable-sized
building." Electronics Oct. 1, 1957, p. 178
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net |
| Date | 2008-01-22 22:52 |
| From | "Steven Yi" |
| Subject | Re: [Cs-dev] alloca |
| Attachments | None |
| Date | 2008-01-23 00:13 |
| From | Anthony Kozar |
| Subject | Re: [Cs-dev] alloca |
Thanks for thinking of OS 9, Steven :) alloca is not a part of the standard libraries for some MacOS compilers but I have seen an implementation of it in some old GNU distributions. CodeWarrior seems to include it but I have never tested its compatibility on MacOS (the docs are unclear on that). Anthony Steven Yi wrote on 1/22/08 11:39 AM: > I did notice it > mentioning it being possibly not found on non-gnu systems, but I'm not > sure if anything people are compiling with now doesn't support it > (Anthony? Perhaps codewarrior doesn't support it?) ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |