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]

Problem with gcc-2.95


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
$  


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