This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Additional GCC warnings?
On Friday, 21 March 2003 07:31, David Taylor wrote:
> EMC has, in house, added several new warnings to GCC. Are people
> generally in favor of adding new warnings to GCC? If yes, then
> assuming the implementation/etc is acceptable, which of the following
> would people be interested in seeing patches for?
>
> -Waggregate-passed-by-value / -Wno-aggregate-passed-by-value
>
> Warn if an aggregate parameter is passed by value rather than
> by reference.
Not interested.
> -Wenum-mismatch / -Wno-enum-mismatch
>
> Warn when value assigned to a variable of an enumeral type
> doesn't correspond to an enumerator
This would be useful.
> -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.
> -Winclude-depth-exceeds=<n>
>
> Warn if the number of nested levels of #include'd files exceeds
> <n>. Warning can be suppressed by #pragma
> include_depth_check_off and re-enabled by #pragma
> include_depth_check_on.
Not interested. (Actually, I can't imagine what this could be useful to
anyone for.)
> -Wpointer-cast-to-signed / -Wno-pointer-cast-to-signed
>
> Warn about any casting of pointer type data to a signed entity
Possibly useful.
--
Ross Smith ......... r-smith at ihug dot co dot nz ......... Auckland, New Zealand
Eagles may soar, but weasels never get sucked into a land war in Asia.