This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c/8290: [3.2/3.3 regression] Initialization with compound literalsduring declaration fails with gcc 3.2
- From: Wolfgang Bangerth <bangerth at ticam dot utexas dot edu>
- To: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- Cc: gcc-bugs at gcc dot gnu dot org, <kipp at sgl dot crestech dot ca>, <gcc-gnats at gcc dot gnu dot org>
- Date: Tue, 3 Dec 2002 09:05:17 -0600 (CST)
- Subject: Re: c/8290: [3.2/3.3 regression] Initialization with compound literalsduring declaration fails with gcc 3.2
On Tue, 3 Dec 2002, Joseph S. Myers wrote:
> On 2 Dec 2002 bangerth@dealii.org wrote:
>
> > Confirmed. Assuming the code is legal, it is a regression
> > from 3.0, which compiled it fine. A simpler code is this:
>
> This is deliberate, and the subject of previous mistaken PRs. Compound
> literals are, in C99, unnamed variables, not constant expressions that can
> be used in initializers, and allowing them in initializers is not
> consistent with the C language and this C99 concept. There is a special
> allowance for the old GNU "constructor expressions", which used the same
> syntax but had different semantics in this area, in gnu89 mode, but not
> gnu99.
So, am I right that this report should be closed as well?
Thanks
Wolfgang
-------------------------------------------------------------------------
Wolfgang Bangerth email: bangerth@ticam.utexas.edu
www: http://www.ticam.utexas.edu/~bangerth