This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Additional GCC warnings?
- From: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- To: Ross Smith <r-smith at ihug dot co dot nz>
- Cc: <gcc at gcc dot gnu dot org>
- Date: Fri, 21 Mar 2003 07:57:56 +0000 (GMT)
- Subject: Re: Additional GCC warnings?
On Fri, 21 Mar 2003, Ross Smith wrote:
> > -Wprecision-mismatch / -Wno-precision-mismatch
> >
> > Warn when the precision of the destination is smaller than
> > the precision of the source.
>
> This would be _very_ useful! Do you intend it to include integers, or
> only floating point? FP alone would be useful, but it would be even
> more useful with integers.
>
> What about signed/unsigned and int/float conversions? GCC currently
> warns about some mixed-mode arithmetic, but not all.
The right framework for this sort of thing is a properly rewritten
-Wconversion (warn for any implicit conversion that may change a value).
But options for individual cases of this (as here) may also be useful.
--
Joseph S. Myers
jsm28 at cam dot ac dot uk