This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
size of member `v' is not constant
- To: gcc-help at gcc dot gnu dot org
- Subject: size of member `v' is not constant
- From: Stephen Tse <stephent at sfu dot ca>
- Date: 04 Jun 2001 23:39:57 -0700
Hi all! I can compile
class A {
static const int n;
int v[n];
};
const int A::n = 10;
successfully with gcc-2.95 but not 3.0 (20010402 debian):
test.cc:6: size of member `v' is not constant
Is it a (known) bug? Or, is there a new rule about this? I can put
declaration and definition in the same line (static const int n = 10)
but I prefer separate statements.
Thanks.