[Bug c++/19826] [4.0 Regression] More array bounds rejected as non-constant in template...
pinskia at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Wed Feb 9 06:38:00 GMT 2005
------- 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
More information about the Gcc-bugs
mailing list