P
Peter Ammon
My code obfuscator gave me this:
char buff[1, 9];
to which gcc retorted:
"ISO C90 forbids variable-size array 'buff'"
and checking the standard, it appears that commas are indeed forbidden
from being in a constant expression.
Why's that? Wouldn't it make more sense to allow commas as long as the
left and right operands are also constant expressions? Calling the
expression 1,9 "variable-size" is pretty silly.
-Peter
char buff[1, 9];
to which gcc retorted:
"ISO C90 forbids variable-size array 'buff'"
and checking the standard, it appears that commas are indeed forbidden
from being in a constant expression.
Why's that? Wouldn't it make more sense to allow commas as long as the
left and right operands are also constant expressions? Calling the
expression 1,9 "variable-size" is pretty silly.
-Peter