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]

C++: Parser regression over 1.1.2


In egcs 1.1, we would accept the code

typedef unsigned int QRgb;
struct QColor{
  QColor( QRgb rgb);
};

struct QColorGroup{
  QColorGroup( const QColor &foreground, const QColor &background);
};

int main()
{
  QColorGroup normal( QColor( QRgb(16711680) ), QColor( QRgb(16777215) ));
}

On i486-pc-linux-gnu,  gcc-2.95 19990606 says

a.cc: In function `int main()':
a.cc:12: redeclaration of `struct QColor QRgb'
a.cc:12: `struct QColor QRgb' previously declared here

It somehow thinks this is a declaration. I don't think so :-)

Regards,
Martin


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