This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
c++/6803: another cand. for HIGH (regr. wrt 3.0.x and 2.95.x)
- From: Paolo Carlini <pcarlini at unitus dot it>
- To: gcc at gcc dot gnu dot org
- Cc: Mark Mitchell <mark at codesourcery dot com>
- Date: Sat, 25 May 2002 10:32:53 +0200
- Subject: 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;
}