Bug#128950: gcc-3.0: -Wconversion should be split into two distinct flags
Package: gcc-3.0
Version: 1:3.0.3-1
Severity: normal
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).
-- Agthorr
-- System Information
Debian Release: 3.0
Architecture: i386
Kernel: Linux eleutheromania 2.4.16 #1 Tue Dec 4 11:20:43 PST 2001 i686
Locale: LANG=C, LC_CTYPE=
Versions of packages gcc-3.0 depends on:
ii binutils 2.11.92.0.12.3-4 The GNU assembler, linker and bina
ii cpp-3.0 1:3.0.3-1 The GNU C preprocessor.
ii gcc-3.0-base 1:3.0.3-1 The GNU Compiler Collection (base
ii libc6 2.2.4-7 GNU C Library: Shared libraries an
ii libgcc1 1:3.0.3-1 GCC support library.
Reply to: