Linus Torvalds writes: (Summary) It's that "-Wvla" is gar=
bage.
bage.
Lookie here:
Lookie here:
int array[(1,2)];
int array[(1,2)];
results in gcc saying
results in gcc saying
warning: ISO C90 forbids variable length array =E2=80=98array=E2=80=99= [-Wvla]
int array[(1,2)];
^~~
^~~
and that error message - and the name of the flag - is obviously pure garba= ge.
ge.
What is *actually* going on is that ISO C90 requires an array size to be not a constant value, but a constant *expression*.
bage.
Lookie here:
Lookie here:
int array[(1,2)];
int array[(1,2)];
results in gcc saying
results in gcc saying
warning: ISO C90 forbids variable length array =E2=80=98array=E2=80=99= [-Wvla]
int array[(1,2)];
^~~
^~~
and that error message - and the name of the flag - is obviously pure garba= ge.
ge.
What is *actually* going on is that ISO C90 requires an array size to be not a constant value, but a constant *expression*.