-Wconversion producing incorrect warning
Kevin P. Fleming
kpfleming@starnetworks.us
Mon Oct 31 17:30:00 GMT 2005
When compiling this program:
#include <sys/types.h>
#include <inttypes.h>
typedef uint16_t t;
int f(t x)
{
return x*x;
}
int main(int argc, char *argv[])
{
t b = 12;
return f(b);
}
using GCC 3.3.5, 3.4.3 and 4.0.1 with '-Wconversion' in effect, I get
this warning:
luigi.c: In function `main':
luigi.c:15: warning: passing arg 1 of `f' with different width due to
prototype
I don't understand why this is true... the prototype and the argument
are of the same type.
More information about the Gcc-help
mailing list