public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* -Wconversion producing incorrect warning
@ 2005-10-31 17:30 Kevin P. Fleming
  2005-10-31 17:42 ` John Love-Jensen
  2005-11-04 11:54 ` Segher Boessenkool
  0 siblings, 2 replies; 8+ messages in thread
From: Kevin P. Fleming @ 2005-10-31 17:30 UTC (permalink / raw)
  To: gcc-help

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.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2005-11-04 12:38 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-31 17:30 -Wconversion producing incorrect warning Kevin P. Fleming
2005-10-31 17:42 ` John Love-Jensen
2005-10-31 18:40   ` Kevin P. Fleming
2005-10-31 18:53     ` John Love-Jensen
2005-10-31 19:35       ` Kevin P. Fleming
2005-11-04 11:54 ` Segher Boessenkool
2005-11-04 12:20   ` John Love-Jensen
2005-11-04 12:38     ` Segher Boessenkool

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).