Testcase: template <int> struct a { static bool f() { const int as(2); float anArray[as] = { 0.0f, 0.0f }; return (anArray[0] == anArray[1]); } };
---- If we remove the const from the declaration of as, we get an error with -pedantic-errors that we have a VLA (otherwise we accept the code). -- Summary: [4.2/4.3/4.4 Regression] Funny rejects valid with constant integral expression Product: gcc Version: 4.3.0 Status: UNCONFIRMED Keywords: rejects-valid Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: pinskia at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36089