Mail Archives: djgpp/2000/08/09/19:17:20
Hi all.
While compiling a program, I am getting some strange
conversion warnings - I have -Wconversion enabled
intentionally to catch unintended conversions.
The following short sample will demonstrate:
----------
void f(float, char);
int main(void)
{
float x;
char c;
x = 22.0 / 7.0;
c = '*';
f(x, c);
return 1;
}
----------
When compiled, it gives the following output:
gcc -Wconversion -c test.c
test.c: In function `main':
test.c:11: warning: passing arg 1 of `f' as `float' rather than `double' due to prototype
test.c:11: warning: passing arg 2 of `f' with different width due to prototype
Any ideas?
---------------
Let's Go Canes!
- Raw text -