From: "Rene Perlberg" <Perle5000@gmx.de>
To: gcc-help@gcc.gnu.org
Subject: Warning when passing int, but unsigned int is awaited?
Date: Wed, 13 Feb 2008 16:04:00 -0000 [thread overview]
Message-ID: <20080213160431.145850@gmx.net> (raw)
Hello everyone,
following scenario:
void func(unsigned int _u)
{
//do a lot of stuff
}
int main()
{
int i = -1;
func(i);
return 0;
}
Is there any way to make the compiler write a warning or an error, when an int is passed to a function which awaits an unsigned int? I tried some of the options gcc gives the user, but nothing worked for me.
I'm using gcc, version 4.1.3 20070929.
Best regards.
--
Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten
Browser-Versionen downloaden: http://www.gmx.net/de/go/browser
next reply other threads:[~2008-02-13 16:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-13 16:04 Rene Perlberg [this message]
2008-02-13 16:12 ` John Love-Jensen
2008-02-13 16:26 ` Rene Perlberg
2008-02-13 16:52 ` John Love-Jensen
2008-02-13 21:06 ` Robert William Fuller
2008-02-13 23:58 ` James Tebneff
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=20080213160431.145850@gmx.net \
--to=perle5000@gmx.de \
--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).