------- Comment #10 from manu at gcc dot gnu dot org 2010-06-11 13:33 ------- (In reply to comment #8) > > In both cases, T+T has type int,
We know that, but I don't think most C/C++ programmers know about integer promotion rules. We just disagree here. But since this is mandated by the standard, you are right. > so obviously it fits in an int. It doesn't For a strict-standard definition of "fits", because it may overflow and a layman wouldn't say that it "fits" in that case. > This is mandated by the standard and the diagnostic is IMHO clear. I am not arguing against that (although, I think it is unfortunate). I would prefer a bit longer message: error: C++0x does not allow narrowing conversion of "(((int)y) + 1)" from "int" to "char" inside { } (BTW, I think those braces should be within quotes). But since I guess I am in the minority here, we'll have to close this as INVALID. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44500