This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Problem with gcc-2.95
- To: "'gcc-bugs at gcc dot gnu dot org'" <gcc-bugs at gcc dot gnu dot org>
- Subject: Problem with gcc-2.95
- From: "Fengler, Matthias" <Matthias dot Fengler at dresdner-bank dot com>
- Date: Mon, 16 Aug 1999 09:17:05 +0200
Hello,
I found a problem with gcc-2.95 (tested on Linux/i386 and HP/UX 10.20).
The following short program doesn't compile.
Inserting a dummy typedef makes it compile fine.
Best regards,
Matthias Fengler
Dresdner Bank AG
GM IT 4
Juergen-Ponto-Platz 1
60301 Frankfurt
Germany
class X1
{
public:
typedef struct {
int xx;
} MyStruct1;
};
#ifdef WORKAROUND
/* This dummy typedef makes the program compile */
typedef X1::MyStruct1 someDummyType;
#endif
X1::MyStruct1 foo()
{
X1::MyStruct1 m1;
return m1;
}
$ g++ -c x.cpp
x.cpp:14: semicolon missing after declaration of `struct X1::MyStruct1'
x.cpp: In function `int foo()':
x.cpp:16: `struct X1::MyStruct1' used where a `int' was expected
$