Bug#128950: gcc's -Wconversion
Geoff Thorpe <firstname.lastname@example.org> 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 Schwab, SuSE Labs, email@example.com
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."