private member in union { union }

Jakub Staszak kubastaszak@gmail.com
Fri Dec 30 15:25:00 GMT 2011


Hello,

I've found that:

class Prv {
private:
  union
  {
    union
    {
      unsigned int Bits;
    };
  };
};

unsigned int getBits(Prv *P) {
  return P->Bits;
}

doesn't generate any error. Is it a bug?

-- 
Jakub Staszak



More information about the Gcc mailing list