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]
Other format: [Raw text]

c++/6803: another cand. for HIGH (regr. wrt 3.0.x and 2.95.x)


Hi,

what about HIGH PRIORITY for this one? I have confirmed that it doesn't 
compile anymore with 3.1 (double checked for correctness with 3 other 
compilers):

Ciao,
Paolo.

// -----------------------------------
class QQ;

class RR
{
public:
  short xx;
        RR(const long long i);
        RR();
        RR(const RR& f);
        ~RR();
};

class QQ
{
public:
  RR    yy[4][4];
        QQ();
        QQ(const RR& f);
        ~QQ();
};

inline RR::RR(const long long i)
{
  xx = (short)i;
}

inline RR::RR() {xx = 0;}
inline RR::RR(const RR& f) {xx = f.xx;}
inline RR::~RR() {}

inline QQ::QQ()
{
  for(int i=0;i<4;i++)
  {
    for(int j=0;j<4;j++)
    {
      yy[i][j] = 0;
    }
  }
}

inline QQ::QQ(const RR &f)
{
  for(int i=0;i<4;i++)
  {
    for(int j=0;j<4;j++)
    {
      yy[i][j] = f;
    }
  }
}

inline QQ::~QQ(){}

int main()
{
  QQ x  = RR(123);
  QQ *y = &x;
  QQ z  = *y;

  return x.yy[3][3].xx;
}



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