This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]