------- Comment #7 from manu at gcc dot gnu dot org 2010-06-11 13:07 ------- He is referring to a testcase like:
template<typename T, T C> void f() { struct A { T x; }; T y = 42; A a = { y + C }; } int main() { f<int,1>(); f<char,1>(); } So, we warn for T == char but not for T == int. I know that the standard considers differently narrowing and overflow but the difference is still surprising. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44500