Is this valid under the variable-length array standard in C99?
And yes, it compiles with no warnings (gcc). I thought one needed to explicity use an int or size_t, etc. like this:Code:int foo(char *p) { char s[ strlen(p) ]; .......... }
Code:int foo(char *p, size_t x) { char s [ x ]; ...... }