[Bug c++/40733] No warning is issued when an implicit conversion can lead to a data loss

photon at seznam dot cz gcc-bugzilla@gcc.gnu.org
Tue Jul 14 08:37:00 GMT 2009



------- Comment #4 from photon at seznam dot cz  2009-07-14 08:37 -------
(In reply to comment #3)
> and with  integer promotion happening with simple stuff like a + b,
> some folks will have a hard time to understand that happens which
> is why it is not enabled with -Wall.

The warning is issued only for rare conversions involving a potential data loss
which should always be explicit.

> 
> Plus there are style warnings not included in -Wall.  I really doubt you want
> style warnings enabled with -Wall :).
> 

-Wall should be a real -Wall. Now it does not include important warnings like
those generated by -Wconversion (potential implicit data loss).

GCC should use numerical warning levels. The current -Wall should be renamed
to, e.g., -W3 and the new -Wall option should enable all warnings as the name
says.


-- 


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



More information about the Gcc-bugs mailing list