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]

Enough already with the KDE bug!


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.


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