[Bug c++/47488] [4.4,4.5,4.6 Regression] (sizeof|decltype) + template + string literals: ICE in write_template_arg_literal, at cp/mangle.c

hjl.tools at gmail dot com gcc-bugzilla@gcc.gnu.org
Thu Jan 27 20:27:00 GMT 2011


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47488

--- Comment #4 from H.J. Lu <hjl.tools at gmail dot com> 2011-01-27 20:19:23 UTC ---
(In reply to comment #1)
> This c++98 variation using sizeof instead of decltype gives an ICE in the same
> place:
> 
> template < typename T >
> int f( const T &, const char * );
> 
> template<int> struct N { };
> 
> template < typename T >
> N<sizeof( f( T(), "" ) )> g( const T &t );
> 
> void h()
> {
>     g( 0 );
> }
> 
> 

It is also caused by revision 140120:

http://gcc.gnu.org/ml/gcc-cvs/2008-09/msg00279.html



More information about the Gcc-bugs mailing list