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]

egcs bug


Hello !!

I found a bug in egcs (egcs 1.1.2) in g++ compiler (egcs-2.91.66).
There is a code causing bug:
----------------------------------------------------------------------------
template <class T>
void doit( T VarVar )
{
	struct { T num; unsigned char str[sizeof(VarVar)]; } z;
}

int main()
{
	doit(3);
	return 0;
}
----------------------------------------------------------------------------
And there is compilation output:
    g++ -c test1.cpp
test1.cpp: In instantiation of `doit<int>(int)::doit<int>(int)::._0<int>':
test1.cpp:4:   instantiated from `doit<int>(int)'
test1.cpp:9:   instantiated from here
test1.cpp:4: `VarVar' was not declared in this scope

Rafal



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