From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4965 invoked by alias); 14 Mar 2011 10:37:27 -0000 Received: (qmail 4918 invoked by uid 22791); 14 Mar 2011 10:37:26 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 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; Mon, 14 Mar 2011 10:37:21 +0000 From: "philipp at marek dot priv.at" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/46028] Regression from GCC 4.4: "storage size of 'test_array' isn't constant" 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: philipp at marek dot priv.at 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: CC 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 Date: Mon, 14 Mar 2011 10:37:00 -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 X-SW-Source: 2011-03/txt/msg01383.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D46028 philipp at marek dot priv.at changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |philipp at marek dot | |priv.at --- Comment #4 from philipp at marek dot priv.at 2011-03-14 10:37:15 UTC --- This fails, too: "error: storage size of =E2=80=98sv=E2=80=99 isn=E2=80=99t= constant" int main(void) { const int len =3D 20; static char sv[len]; } Similarly, gcc 4.4 accepted=20 #define CONST_STRING "aaa" static char x[strlen(CONST_STRING)]; but gcc-4.5 does not. (Of course, I could overload "strlen" ... but whether that's enough reason = to reject that?)