|What's wrong with alloca() ? email@example.com (1991-12-19)|
|Re: What's wrong with alloca() in gcc???? firstname.lastname@example.org (1991-12-31)|
|Re: What's wrong with alloca() in gcc???? email@example.com (1991-12-31)|
|Re: What's wrong with alloca() in gcc???? angular!jas@Sun.COM (1992-01-01)|
|Re: What's wrong with alloca() in gcc???? firstname.lastname@example.org (1992-01-02)|
|From:||angular!jas@Sun.COM (Jim Shankland)|
|Date:||Wed, 1 Jan 1992 19:15:24 GMT|
In article 91-12-090 email@example.com (Michael O'Dell) writes:
>At least at one time, the dynamic array stuff in gcc was very broken
>in that if you have
> int foo[z];
>sizeof(foo) returned sizeof(int). This is so wrong as to be beyond
>belief. Yes, it is hard to make it work right, but then, that's why
>one should think hard about putting in such "features".
It works now.
I'd be willing to bet it wasn't really returning sizeof(int), but rather
sizeof(int *): erroneously doing the conversion to pointer to first
member. I seem to remember a version of the System V compiler back around
'83 that made the same mistake for plain old static arrays: sizeof(any
array) was 4. I'm not sure when something that's wrong becomes "so wrong
as to be beyond belief" ....
Any feature incorrectly implemented is likely not to be useful.
Personally, I prefer dynamic arrays to alloca(), . Too bad they're not C.
Return to the
Search the comp.compilers archives again.