This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

size of member `v' is not constant




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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]