This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Enough already with the KDE bug!
- To: egcs-bugs at cygnus dot com, egcs at cygnus dot com
- Subject: Enough already with the KDE bug!
- From: Hyman Rosen <hymie at prolifics dot com>
- Date: Wed, 31 Dec 1997 10:16:19 -0500
- Cc: martin at mira dot isdn dot cs dot tu-berlin dot de
Martin von Loewis (martin@mira.isdn.cs.tu-berlin.de) writes:
> class KProcess { public: bool normalExit(); private: int status; };
> bool KProcess::normalExit()
> {
> union { __typeof( status ) in; int i; } u;
> return false;
> }
>
> bash-2.00# g++ -c k.cc
> k.cc: In method `bool KProcess::normalExit()':
> k.cc: member `status' is a private member of class `KProcess'
> k.cc: warning: ANSI C++ forbids declaration `in' with no type
Enough with this bug report already. There's a patch for this
available in the KDE sources. It's not legal C++. The union
declares a new class, and it is not a friend of KProcess, so
it has no access to the private names of KProcess. So the
__typeof(status) in the union is illegal.