public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Warning when passing int, but unsigned int is awaited?
@ 2008-02-13 16:04 Rene Perlberg
  2008-02-13 16:12 ` John Love-Jensen
  0 siblings, 1 reply; 6+ messages in thread
From: Rene Perlberg @ 2008-02-13 16:04 UTC (permalink / raw)
  To: gcc-help

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

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

end of thread, other threads:[~2008-02-13 23:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-13 16:04 Warning when passing int, but unsigned int is awaited? Rene Perlberg
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

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).