Linus Torvalds writes: (Summary) But constant simplification and CSE etc is just a very
fundamental part of a compiler, and anybody who actually implements
VLA's would have to do it anyway.
VLA's would have to do it anyway.
So no, a message like
So no, a message like
warning: Array declaration is not a C90 constant expression, resulting in VLA code generation
resulting in VLA code generation
would be moronic. The two just do not follow AT ALL.
just do not follow AT ALL.
So the message might be about _possibly_ resulting in VLA code generation, but honestly, at that point you should just add the warning when you actually generate the code to do the stack allocation.
allocation.
Because at that point, you know whether it's variable or not.
VLA's would have to do it anyway.
So no, a message like
So no, a message like
warning: Array declaration is not a C90 constant expression, resulting in VLA code generation
resulting in VLA code generation
would be moronic. The two just do not follow AT ALL.
just do not follow AT ALL.
So the message might be about _possibly_ resulting in VLA code generation, but honestly, at that point you should just add the warning when you actually generate the code to do the stack allocation.
allocation.
Because at that point, you know whether it's variable or not.