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

Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |manu at gcc dot gnu.org

--- Comment #1 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
GCC should not try to pretty print input expressions, but it should try hard to
point to the correct location.

Clang by comparison:

test.cc:2:10: error: type 'double' cannot be narrowed to 'int' in initializer
list [-Wc++11-narrowing]
  int pi{3.14};
         ^~~~
test.cc:2:10: note: override this message by inserting an explicit cast
  int pi{3.14};
         ^~~~
         static_cast<int>( )
test.cc:2:10: warning: implicit conversion from 'double' to 'int' changes value
from 3.14 to 3 [-Wliteral-conversion]
  int pi{3.14};
        ~^~~~
1 warning and 1 error generated.


There is already a bug open about this issue somewhere.

Reply via email to