This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: gcc's -Wconversion
- From: Andreas Schwab <schwab at suse dot de>
- To: Geoff Thorpe <geoff at geoffthorpe dot net>
- Cc: Agthorr <agthorr at barsoom dot org>,Segher Boessenkool <segher at koffie dot nl>,"Joseph S. Myers" <jsm28 at cam dot ac dot uk>, bangerth at dealii dot org,128950 at bugs dot debian dot org, gcc-bugs at gcc dot gnu dot org, gcc-gnats at gcc dot gnu dot org,josh dot dybnis at sandtechnology dot com
- Date: Fri, 07 Feb 2003 11:38:52 +0100
- Subject: Re: gcc's -Wconversion
- 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."