This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/19826] [4.0 Regression] More array bounds rejected as non-constant in template...
- 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: 8 Feb 2005 19:50:03 -0000
- Subject: [Bug c++/19826] [4.0 Regression] More array bounds rejected as non-constant in template...
- References: <20050208164644.19826.pcarlini@suse.de>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-02-08 19:50 -------
Is the problem here (in sematics.c):
/* Since this name was dependent, the expression isn't
constant -- yet. No error is issued because it might be
constant when things are instantiated. */
if (integral_constant_expression_p)
*non_integral_constant_expression_p = true;
Can someone help me if this really should be false because that fixes both this bug and PR 18470.
With that change we still reject the following testcase:
template<typename T> struct A
{
static const T i = 1;
char a[i];
};
A<float> a;
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19826