This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/16859] Empty initializer for array of unknown size spuriously accepted
- From: "cvs-commit at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Mar 2005 17:03:57 -0000
- Subject: [Bug c++/16859] Empty initializer for array of unknown size spuriously accepted
- References: <20040803023251.16859.bangerth@dealii.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-03-09 17:03 -------
Subject: Bug 16859
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: paolo@gcc.gnu.org 2005-03-09 17:03:39
Modified files:
gcc/cp : ChangeLog decl.c
Log message:
2005-03-09 Paolo Carlini <pcarlini@suse.de>
PR c++/16859
* decl.c (complete_array_type): In pedantic mode, return
3 for an empty initializer list as the initializer for an
array of unknown bound (8.5.1/4).
(maybe_deduce_size_from_array_init): Fix final test to use
the above.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4656&r2=1.4657
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/decl.c.diff?cvsroot=gcc&r1=1.1375&r2=1.1376
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16859