This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Enough already with the KDE bug!
- To: martin at mira dot isdn dot cs dot tu-berlin dot de (Martin von Loewis)
- Subject: Re: Enough already with the KDE bug!
- From: Joe Buck <jbuck at synopsys dot com>
- Date: Wed, 31 Dec 97 10:39:23 PST
- Cc: hymie at prolifics dot com, egcs-bugs at cygnus dot com, egcs at cygnus dot com
> Also, please note that typeof is a GNU extension. Where in the info
> pages does it say that typeof fails when passing non-accessible C++
> members? You are not trying to access the value, you only want the
> type.
typeof, like sizeof, depends only on the type. But you can't take sizeof
an inaccessible member according to the C++ standard; it seems that
typeof should behave in the same way.
A private member is just that; client code is not supposed to be aware
of even the existence of private members. Given this, the behavior
should not be a surprise.