Gcc warning instead of error
Gcc warning instead of error
- Subject: Gcc warning instead of error
- From: Steve Checkoway <email@hidden>
- Date: Tue, 22 Jul 2008 00:58:19 -0700
Gcc will emit a warning for what should really be an error in the
following case:
struct foo { foo() {} };
void bar( int i, ... );
void baz() { bar( 0, foo() ); }
compiles to
__Z3bazv:
stmw r30,-8(r1)
stwu r1,-48(r1)
mr r30,r1
trap
with the warning, "warning: cannot pass objects of non-POD type
‘struct foo’ through ‘...’; call will abort at runtime."
I cannot think of a single situation where I want gcc to insert a trap
in my code rather than signal an error on what is typically bad
arguments to printf(). Is there a way to make this an error other than
-Werror which (unfortunately) I cannot use as there are warnings in
code I can't change?
--
Steve Checkoway
"Anyone who says that the solution is to educate the users
hasn't ever met an actual user." -- Bruce Schneier
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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