From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10041 invoked by alias); 18 Apr 2013 08:10:23 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 10017 invoked by uid 48); 18 Apr 2013 08:10:20 -0000 From: "mizvekov at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/56991] constexpr std::initializer_list rejects too complex initialization Date: Thu, 18 Apr 2013 08:10:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: mizvekov at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-SW-Source: 2013-04/txt/msg01662.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D56991 --- Comment #2 from Matheus Izvekov 2013-04-18 = 08:10:19 UTC --- I get also a similar bug: #include //is accepted by gcc constexpr std::initializer_list good1 =3D { 1, 2, 3 }; struct foo { int a, b; }; //still ok constexpr foo good2 =3D { 1, 2 }; //gcc rejects this constexpr std::initializer_list bad =3D { { 1, 2 }, { 3, 4} }; Compiling this gives a similar error: test.cc:12:64: error: =E2=80=98const std::initializer_list{((const foo= *)(& _ZGRL3bad0)), 2u}=E2=80=99 is not a constant expression >>From gcc-bugs-return-420518-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Apr 18 08:12:47 2013 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 11817 invoked by alias); 18 Apr 2013 08:12:47 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 11788 invoked by uid 48); 18 Apr 2013 08:12:44 -0000 From: "morwenn29 at hotmail dot fr" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/56991] constexpr std::initializer_list rejects too complex initialization Date: Thu, 18 Apr 2013 08:12:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: morwenn29 at hotmail dot fr X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 X-SW-Source: 2013-04/txt/msg01663.txt.bz2 Content-length: 285 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56991 --- Comment #3 from Morwenn 2013-04-18 08:12:44 UTC --- (In reply to comment #1) > I don't see the compiler *crashing*, I see it *rejecting* the snippet. Indeed, sorry for the poor formulation.