Re: AC_*/AM_* macros for options

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeffrey Walton wrote:
> When Linux/Unix folks turn off
> -Wconversion, what do they use to find the bad conversions?

The projects I normally work with don't use any automated
tools.  Instead, code is written in such a way that bad
conversions are unlikely to happen.

For example, the Emacs developers avoid using unsigned types.
This avoids these bad conversions.

The coreutils developers write their code carefully.
Which they have to do anyway, for reasons that should be obvious.
This also works reasonably well.  Well enough so that almost
all the bad-conversion warnings are bogus, anyway.  I just
now compiled coreutils-8.21 with -Wconversion, got 1845
warnings, looked at the first 10, found that they were
all bogus, and gave up.  In one example, the code subtracted
two pointers that were into the same array and stored the
result into a size_t variable, and the compiler warned about
conversion from ptrdiff_t to size_t.  Which is a totally
bogus warning.

It's not worth my (or anybody else's) time to wade through
all those bogus messages.  We have lots better ways to
find bugs in coreutils than that.

_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
https://lists.gnu.org/mailman/listinfo/autoconf




[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux