-Wconversion should be split into two distinct flags
>Submitter-Id: net
>Originator: Agthorr <agthorr@barsoom.org>
>Organization: The Debian Project
>Confidential: no
>Synopsis:
>Severity: non-critical
>Priority: low
>Category: c
>Class: change-request
>Release: 3.2.1 (Debian) (Debian unstable)
>Environment:
System: Debian GNU/Linux (unstable)
Architecture: i686
host: i386-linux
Configured with: ../src/configure -v --enable-languages=c,c++,java,f77,proto,pascal,objc,ada --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.2 --enable-shared --with-system-zlib --enable-nls --without-included-gettext --enable-__cxa_atexit --enable-clocale=gnu --enable-java-gc=boehm --enable-objc-gc i386-linux
Thread model: posix
gcc version 3.2.2 20021212 (Debian prerelease)
>Description:
[ Reported to the Debian BTS as report #128950.
Please CC 128950@bugs.debian.org on replies.
Log of report can be found at http://bugs.debian.org/128950 ]
The -Wconversion option to gcc is documented as doing two things:
------------------------------------------------------------------------
`-Wconversion'
Warn if a prototype causes a type conversion that is different
from what would happen to the same argument in the absence of a
prototype. This includes conversions of fixed point to floating
and vice versa, and conversions changing the width or signedness
of a fixed point argument except when the same as the default
promotion.
Also, warn if a negative integer constant expression is implicitly
converted to an unsigned type. For example, warn about the
assignment `x = -1' if `x' is unsigned. But do not warn about
explicit casts like `(unsigned) -1'.
------------------------------------------------------------------------
It'd be nice if these two behaviors were two controlled via two
separate flags. The second behavior would have caught a bug I've been
hunting for hours, while the first behavior is very undesirable to me
(and useless since I also compile with -Wstrict-prototypes).
>How-To-Repeat:
>Fix:
Reply to: