From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25737 invoked by alias); 24 Apr 2012 14:38:17 -0000 Received: (qmail 25664 invoked by uid 22791); 24 Apr 2012 14:38:16 -0000 X-SWARE-Spam-Status: No, hits=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,KHOP_THREADED X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 24 Apr 2012 14:38:03 +0000 From: "manu at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/53091] static initializer accepted by clang but not by gcc Date: Tue, 24 Apr 2012 14:38: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: enhancement X-Bugzilla-Who: manu at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Status Last reconfirmed Summary Ever Confirmed Severity 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 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 X-SW-Source: 2012-04/txt/msg02139.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D53091 Manuel L=C3=B3pez-Ib=C3=A1=C3=B1ez changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2012-04-24 Summary|Const assignment fails in |static initializer accepted |GCC 4.2, 4.4, 4.6, 4.7 - |by clang but not by gcc |works fine in clang | Ever Confirmed|0 |1 Severity|normal |enhancement --- Comment #13 from Manuel L=C3=B3pez-Ib=C3=A1=C3=B1ez 2012-04-24 14:37:42 UTC --- (In reply to comment #12) > There is no requirement to accept this static initializer, but the code=20 > does try to be lax about constants in initializers (there is no=20 > requirement to reject it either) and fold them with c_fully_fold (see=20 > c-typeck.c:digest_init). So it may make sense to look at why this laxity= =20 > isn't causing this code to be accepted. So confirmed. bugs@m8y.org, I would recommend that if you are interested in this, take a = more active role. First, by finding out where and why the C FE does not accept t= his code. Then posting the results of your investigation here.