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

971105 strange g++ pb (still)


This strange problem is still present in 971105 g++.  (BTW, this is
found by trying to build kde on linux/glibc2.0.5).

The strange code below is the expansion of WIFEXITED on glibc205.

Here's what happens:
g++ -c Test.cc
Test.cc: In method `bool KProcess::normalExit()':
Test.cc:15: member `status' is a private member of class `KProcess'

Well, that's all nonsense.  We're trying to access 'status' from a
member function of KProcess.  So what's this complaint that it's
private?

#include <sys/types.h>
class KProcess {
private:
  pid_t pid;
  int status;          
  bool runs;           
public:
  bool normalExit();
};


bool KProcess::normalExit()
{
  return (pid != 0) && (!runs) && ((((  (__extension__ ({ union { __typeof(  status  ) __in; int __i; } __u;	__u.__in = (  status  ); __u.__i; }))   ) & 0x7f)  == 0)  );
}



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