[Bug c++/55671] -Wconversion fails to warn for sign-conversion

2012-12-13 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55671 Paolo Carlini changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|

[Bug c++/55671] -Wconversion fails to warn for sign-conversion

2012-12-13 Thread manu at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55671 --- Comment #9 from Manuel López-Ibáñez 2012-12-13 13:24:51 UTC --- Wsign-conversion was disabled for g++ by explicit request. I don't remember the details and Google seems unable to find the relevant discussion in gcc-patches.

[Bug c++/55671] -Wconversion fails to warn for sign-conversion

2012-12-13 Thread loose at astron dot nl
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55671 --- Comment #8 from loose at astron dot nl 2012-12-13 12:03:02 UTC --- OK, fine with me. It's only that I was caught by surprise that g++ did no longer warn about sign conversion. I can definitely live with an explicit -Wsign-conversion, tho

[Bug c++/55671] -Wconversion fails to warn for sign-conversion

2012-12-13 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55671 --- Comment #7 from Paolo Carlini 2012-12-13 11:29:24 UTC --- This is definitely by design, as the snippet I posted also clearly shows. The documentation could be maybe improved I agree, but it's a very general issue that it often gives mo

[Bug c++/55671] -Wconversion fails to warn for sign-conversion

2012-12-13 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55671 --- Comment #6 from Jonathan Wakely 2012-12-13 11:25:37 UTC --- It gives it as an example then says "Warnings about conversions between signed and unsigned integers are disabled by default in C++ unless -Wsign-conversion is explicitly enab

[Bug c++/55671] -Wconversion fails to warn for sign-conversion

2012-12-13 Thread loose at astron dot nl
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55671 --- Comment #5 from loose at astron dot nl 2012-12-13 11:09:43 UTC --- If this is by design, then the documentation is buggy. Here's a literal quote form the man page of g++ -Wconversion Warn for implicit conversions tha

[Bug c++/55671] -Wconversion fails to warn for sign-conversion

2012-12-13 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55671 --- Comment #4 from Paolo Carlini 2012-12-13 10:41:49 UTC --- I agree, I suspected it was by the design. Since Manuel worked on this, let's wait a bit before closing the Bug.

[Bug c++/55671] -Wconversion fails to warn for sign-conversion

2012-12-13 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55671 --- Comment #3 from Jonathan Wakely 2012-12-13 10:37:34 UTC --- This is a common idiom in C++ and shouldn't warn e.g. static const size_type npos = -1;

[Bug c++/55671] -Wconversion fails to warn for sign-conversion

2012-12-13 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55671 --- Comment #2 from Jonathan Wakely 2012-12-13 10:35:58 UTC --- Surely this is by design, as documented: Warnings about conversions between signed and unsigned integers are disabled by default in C++ unless -Wsign-conversion is expli

[Bug c++/55671] -Wconversion fails to warn for sign-conversion

2012-12-13 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55671 Paolo Carlini changed: What|Removed |Added CC||manu at gcc dot gnu.org --- Com