Ö
Öö Tiib
Le 05/09/12 00:13, Ian Collins a écrit :
int fn(void)
{
int i;
}
You do not test for "int i;"
We should ban then all stack allocation?
What are you saying actually? I do not understand what you want.
The VLA is actually non-standard alloca() standardized behind array
declaration syntax. Using alloca() for up to few hundred bytes was
generally fine and improved performance. Nothing revolutionary there.
Bad usage of alloca() resulted with some legendary stories about
most memorable stack overflow fun. Similar things will happen with
those VLAs.
So Ian is worried. Jacob maybe uses it nicely. Next noob in team
however breaks it and then it is harder to track down than alloca().
VLA is not that easy to find with text search unlike alloca().