GCC 4.x error vs warning
GCC 4.x error vs warning
- Subject: GCC 4.x error vs warning
- From: Schuyler Baldwin II <email@hidden>
- Date: Wed, 23 Jul 2008 19:07:00 -0500
The following code generates a warning. I would like it to generate
an error. With gcc 4.2 I can turn some warnings into errors with the -
Werror= flag. Does anybody
know if this is possible with GCC ?
I think this warning should always be an error.
void foo(int *cnt);
void test(void);
void foo( int *cnt)
{
*cnt = 5;
}
void test(void)
{
int cnt;
foo(cnt); // warning: passing argument 1 of 'foo' makes pointer
from integer without a cast
foo(&cnt); // this is correct;
}
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden