[Bug c++/18470] New: [4.0 regression] array bound rejected as non-constant in template
reichelt at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Sat Nov 13 21:01:00 GMT 2004
The following valid code snippet is rejected by mainline:
========================================
template<typename> struct A
{
static const int i=1;
};
template<typename T> struct B : A<T>
{
using A<T>::i;
char s[i]; // fails
char t[A<T>::i]; // compiles
};
========================================
bug.cc:9: error: array bound is not an integer constant
Mark, I suspect your patch for PR 18429 is responsible for the regression.
Could you please have a look?
--
Summary: [4.0 regression] array bound rejected as non-constant in
template
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Keywords: rejects-valid, monitored
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: reichelt at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org,mmitchel at gcc dot gnu
dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18470
More information about the Gcc-bugs
mailing list