Show compiler warning/error when passing int although unsigned int is expected
consider the following code example:
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.
void func(unsigned int _u)
//do a lot of stuff
int i = -1;
I'm using gcc, version 4.1.3 20070929 on an Ubuntu system.