This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
egcs-971023: Can't access private member in member function?
- To: egcs-bugs at cygnus dot com
- Subject: egcs-971023: Can't access private member in member function?
- From: Horst von Brand <vonbrand at sleipnir dot valparaiso dot cl>
- Date: Mon, 27 Oct 1997 20:01:17 -0300
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