This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/46028] Regression from GCC 4.4: "storage size of 'test_array' isn't constant"
- From: "philipp at marek dot priv.at" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 14 Mar 2011 10:37:20 +0000
- Subject: [Bug c/46028] Regression from GCC 4.4: "storage size of 'test_array' isn't constant"
- Auto-submitted: auto-generated
- References: <bug-46028-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46028
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 âsvâ isnât constant"
int main(void)
{
const int len = 20;
static char sv[len];
}
Similarly, gcc 4.4 accepted
#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?)