[Bug c++/52467] ICE: canonical types differ for int [0] and int [0]
daniel.kruegler at googlemail dot com
gcc-bugzilla@gcc.gnu.org
Sat Mar 3 14:01:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52467
Daniel Krügler <daniel.kruegler at googlemail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |daniel.kruegler at
| |googlemail dot com
--- Comment #1 from Daniel Krügler <daniel.kruegler at googlemail dot com> 2012-03-03 14:01:02 UTC ---
An array of length 0 is not valid. [dcl.array] p1:
"If the constant-expression (5.19) is present, it shall be an integral constant
expression and its value shall be greater than zero."
Thus accepting
int a[0] = {};
or any such variant is a compiler defect.
More information about the Gcc-bugs
mailing list