-Wconversion problem??
Bill Priest
billp@a-concepts.com
Mon Apr 8 15:16:00 GMT 2002
All,
Is -Wconversion supposed to work?
Platform Linux x86
gcc 3.0.4 release
gcc-20020401 snapshot
wconversion.c
------------------------
void foo(float value);
void bar(void)
{
foo((float) 10.0);
}
------------------------
gcc -c -Wconversion wconversion.c
wconversion.c: In function `bar':
wconversion.c:5: warning: passing arg 1 of `foo' as `float' rather than
`double' due to prototype
if the code looks as follows I don't get any warnings
void foo(double value);
void bar(void)
{
foo( (float) 10.0);
}
Am I missing something here??
I looked at comments & code in c-typeck.c
and didn't see anything suspicious.
Bill
More information about the Gcc-bugs
mailing list