public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Kevin P. Fleming" <kpfleming@starnetworks.us>
To: gcc-help@gcc.gnu.org
Subject: -Wconversion producing incorrect warning
Date: Mon, 31 Oct 2005 17:30:00 -0000	[thread overview]
Message-ID: <43665412.3040900@starnetworks.us> (raw)

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.

             reply	other threads:[~2005-10-31 17:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-31 17:30 Kevin P. Fleming [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=43665412.3040900@starnetworks.us \
    --to=kpfleming@starnetworks.us \
    --cc=gcc-help@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).