Bug#128950: gcc's -Wconversion
- To: Geoff Thorpe <geoff@geoffthorpe.net>
- Cc: Agthorr <agthorr@barsoom.org>, Segher Boessenkool <segher@koffie.nl>, "Joseph S. Myers" <jsm28@cam.ac.uk>, bangerth@dealii.org, 128950@bugs.debian.org, gcc-bugs@gcc.gnu.org, gcc-gnats@gcc.gnu.org, josh.dybnis@sandtechnology.com
- Subject: Bug#128950: gcc's -Wconversion
- From: Andreas Schwab <schwab@suse.de>
- Date: Fri, 07 Feb 2003 11:38:52 +0100
- Message-id: <[🔎] jer8akfk8z.fsf@sykes.suse.de>
- Reply-to: Andreas Schwab <schwab@suse.de>, 128950@bugs.debian.org
- In-reply-to: <[🔎] 20030206222243.GE1848@grumpy.geoffnet> (Geoff Thorpe's message of "Thu, 06 Feb 2003 17:22:43 -0500")
- References: <[🔎] 20030206222243.GE1848@grumpy.geoffnet>
Geoff Thorpe <geoff@geoffthorpe.net> writes:
|> Hi all,
|>
|> I've just been searching the gcc bug database because of what I observed
|> to be a damned annoying behaviour of -Wconversion, and lo' and behold,
|> it looks like you've all been there and done that (PR#: 9072 and 6614).
|>
|> Right now, use of -Wconversion seems to be pretty much useless to me if
-Wconversion is designed to help moving K&R to ISO C, nothing more.
|> I use any function that accepts a parameter smaller than 32-bits. Eg.
|>
|> void foo(unsigned short b)
|> {
|> foo(b + 1);
|> }
|>
|> compiled with "gcc -Wconversion" gives the dreaded "warning: passing arg
|> 1 of `foo' with different width due to prototype".
This is exactly behaving as documented.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
Reply to: