[EMAIL PROTECTED] wrote:

> >Variable length arrays are AFAIK a GCCism that has been invented to 
> >avoid the problems caused the need for a platform/compiler specific
> >alloca.h. It later made it into the C99 standard.
>
>
> Which is strange because if the compiler can do variable sized arrays it
> can presumably do alloca() just as well.
>
> (Of course, the Sun compiler implements alloca() itself; on other
> systems it was a function which did something with the stack)

The first such implementation I noticed came with the usenet-news software 
(which I would also identify as the first organized OSS project).

You need to fetch the old stack pointer (from the stack frame of the 
calling function), to subtract the "allocated" size from this value
and write it back and return it.Jörg

-- 
 EMail:[EMAIL PROTECTED] (home) Jörg Schilling D-13353 Berlin
       [EMAIL PROTECTED]                (uni)  
       [EMAIL PROTECTED]     (work) Blog: http://schily.blogspot.com/
 URL:  http://cdrecord.berlios.de/old/private/ ftp://ftp.berlios.de/pub/schily
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to