Re: Gcc warning instead of error (followup)
Re: Gcc warning instead of error (followup)
- Subject: Re: Gcc warning instead of error (followup)
- From: Steve Checkoway <email@hidden>
- Date: Thu, 7 Aug 2008 12:20:34 -0700
As a followup to the thread about gcc emitting a warning for passing
objects of non-POD type through ... rather than an error, Apple
believes that gcc behaves as intended. I disagree and several others
did as well. I encourage you to file your own bugs so that Apple knows
I'm not the only one who feels this way. Feel free to reference <rdar://problem/6092676
>, my original bug.
For those who missed it, my original message is below.
On Jul 22, 2008, at 12:58 AM, Steve Checkoway wrote:
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