This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/16859] New: Empty initializer for array of unknown size spuriously accepted
- From: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Aug 2004 02:32:52 -0000
- Subject: [Bug c++/16859] New: Empty initializer for array of unknown size spuriously accepted
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Section 8.3.1/4 states that arrays of unknown size may only be initialized
by initializer lists of size greater than zero. However, all gcc versions
I have (and a good number of other compilers, btw) accept this code:
----------------
int a[] = {};
----------------
That sounds spurious to me.
W.
--
Summary: Empty initializer for array of unknown size spuriously
accepted
Product: gcc
Version: 3.4.1
Status: UNCONFIRMED
Keywords: accepts-invalid
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: bangerth at dealii dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16859