This is the mail archive of the gcc@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]

"xxx is a private member" message


egcs gives the following message:

foo.cc: In method `void foo::bar()':
foo.cc:12: member `i' is a private member of class `foo'
foo.cc:13: confused by earlier errors, bailing out

while gcc 2.7.2.1 doesn't complain, for the following program:

class foo
{
   int i;
public:
   void bar(void);
};

void foo::bar(void)
{
   struct
   {
      int j[i];
   } k;
   
   k.j[1] = 0;
}

Is that due to a C++ standard change or is something else going on?

	paul


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