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

egcs-971023: Can't access private member in member function?


i586-pc-linux-gnulibc1
gcc version egcs-2.90.14 971023 (gcc2-970802 experimental), libc-5.4.38
complains about the following:

#define	__WAIT_INT(status)						      \
  (__extension__ ({ union { __typeof(status) __in; int __i; } __u;	      \
		    __u.__in = (status); __u.__i; }))

class C
{
 private:
   unsigned status;
 public:
   bool get();
};

bool C::get()
{
   return(__WAIT_INT(status));
}

[root@sleipnir /tmp]# c++ -c tst.cc
tst.cc: In method `bool C::get()':
tst.cc:15: member `status' is a private member of class `C'
[root@sleipnir /tmp]#

I don't see anything against the law being done to status...
-- 
Horst von Brand                             vonbrand@sleipnir.valparaiso.cl
Casilla 9G, Viņa del Mar, Chile                               +56 32 672616



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