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]

g++ 2.95 ICE using typeof extension


The following C++ code, which uses the non-standard typeof extension,
cause gcc 2.95 to complain:

9: Internal compiler error.
---------------------------------------------------------------------------
template < typename T > struct object
{
	static T &it;
};

template < typename A, typename B, typename C >
typeof(object<A>::it * object<B>::it + object<C>::it)
MultiplyAdd(const A &a, const B &b, const C &c)
{
	return a * b + c;
}

int main()
{
	return MultiplyAdd(1, 2, 3);
}


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