This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: This new and useful -Wconversion
- From: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- To: Timo Sirainen <tss at iki dot fi>
- Cc: <gcc at gcc dot gnu dot org>
- Date: Sat, 31 Aug 2002 22:50:31 +0100 (BST)
- Subject: Re: This new and useful -Wconversion
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