This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/36089] New: [4.2/4.3/4.4 Regression] Funny rejects valid with constant integral expression
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 Apr 2008 16:41:33 -0000
- Subject: [Bug c++/36089] New: [4.2/4.3/4.4 Regression] Funny rejects valid with constant integral expression
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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