When I compile this experiment code:
int main(void)
{
int foo = 5;
char bar[foo];
}
with clang and the '-Weverything' or respectively the separate '-Wvla' flag combined with the '-std=c99' flag,
I still get the warning:
warning: variable length array used [-Wvla]
although C99 conform implementations shall, in comparison to later C standards (C11, C18, etc.) - where the VLA-support is optional, support variable length arrays without exception.
- Why do I still get this warning for using a VLA with the
'-std=c99'flag in clang? - Is this a bug or is that just for the hint to take care for the compliance to implementations conforming to later C standards (as well as C89/C90)?