|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
Subject: Re: Format security warnings now in GCC
From: Joseph S. Myers (jsm28
cam.ac.uk)Date: Thu Dec 07 2000 - 06:02:12 CST
- Next message: Chris Evans: "RFT: secure ftp server"
- Previous message: Chris Evans: "Re: Format security warnings now in GCC"
- In reply to: Chris Evans: "Re: Format security warnings now in GCC"
- Reply: Joseph S. Myers: "Re: Format security warnings now in GCC"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Thu, 7 Dec 2000, Chris Evans wrote:
> Still on the security/gcc side of things, any chance you could whine at
> the right people to get -Wconversion fixed?
-Wconversion, as at present designed and implemented, is a fairly useless
option that mainly covers conversions relevant to the addition of
prototypes to a K&R program - showing where adding prototypes may have
changed the behaviour of the program. It also has thrown in the warnings
for implicit conversion of constants. Some warnings - those for passing a
char to a function expecting a char, for example - are of zero utility for
ISO C programs.
A proper -Wconversion would separate out -Wconversion-traditional (say)
from separate options covering the different cases of implicit conversion
that might change the value - change of sign; reduction of integer width;
conversion of complex to real or floating to integer; conversion of
floating to floating with lesser range or precision; conversion of integer
to floating that can't exactly hold all values of the integer type.
Nothing of that is particularly hard to implement, and some of the special
cases (e.g. not warning about constants converted to unsigned, or about
statement-expressions containing a constant and converted to unsigned) are
already covered in the code warning for "signed and unsigned type in
conditional expression". However, it needs the time to design the set of
options involved and the spec for what they should do, get consensus on
that, then implement them along with testcases; it's on my TODO list, but
not a priority for this side of GCC 3.0.
-- Joseph S. Myers jsm28cam.ac.uk
- Next message: Chris Evans: "RFT: secure ftp server"
- Previous message: Chris Evans: "Re: Format security warnings now in GCC"
- In reply to: Chris Evans: "Re: Format security warnings now in GCC"
- Reply: Joseph S. Myers: "Re: Format security warnings now in GCC"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]