This new and useful -Wconversion

Joseph S. Myers jsm28@cam.ac.uk
Sat Aug 31 14:50:00 GMT 2002


On Sun, 1 Sep 2002, Timo Sirainen wrote:

> Google says that I shouldn't use -Wconversion, but are there any plans on
> creating the functionality of it properly? It shouldn't be that difficult to
> copy&paste it to -Wconversion2 or something, and simply removing the few
> useless warnings it creates? Or does it need more work than that?

It needs careful design work (in conjunction with security auditors, a
group with a particular use for a better -Wconversion).  See the projects
list.  Is there still any use at all for the existing functionality
(shakedown after conversion of old code to ISO C) that would require an
option to preserve it, or should the option be repurposed entirely to mean
"warn about all cases of implicit conversion that might change a value
(implies -Wsign-compare)", with the loss of the facility to warn about
passing a char to a function prototyped as taking a char?  Are there
particular cases that should be controlled by separate options?  Do you
want warnings for assigning a long long to a double (which can't hold all
values of long long), etc.?  I may look at this further after 3.3
branches.

-- 
Joseph S. Myers
jsm28@cam.ac.uk



More information about the Gcc mailing list