This short program fails with gcc version 3.3 gcc version 3.5.0 20040317 (experimental) (Idea for test program by John Spicer, Edison Design Group, during WG21 meeting.) The error message (with a slight variation in the line number) is: typeof.cc: In function `int main()': typeof.cc:11: internal compiler error: in write_type, at cp/mangle.c:1491 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. template<class T> int f(T) { }; template<class T> typeof(f<T*>(0)) g(T x) { } struct X { }; int main() { g(X()); }
Confirmed. This never worked. (Sigh: one more in the list of about a dozen ICEs we have with typeof...) W.
This appears to be a duplicate of bug 13740, sorry. *** This bug has been marked as a duplicate of 13740 ***