static array variable size allowed?
Hi, I have a function like this
1 2 3 4 5 6
|
void foo( int i)
{
...
uint8_t buf[ i];
...
}
|
and I don't understand why the compiler is not complaining...
I'm using
g++ -c -g -Wall
to compile
Any ideas??
It is legal in C99 and C11
If you want to use g++ in portable manner, add the command switch -pedantic-errors
Topic archived. No new replies allowed.