Re: Gcc warning instead of error
Re: Gcc warning instead of error
- Subject: Re: Gcc warning instead of error
- From: Steve Checkoway <email@hidden>
- Date: Tue, 22 Jul 2008 05:50:16 -0700
On Jul 22, 2008, at 5:01 AM, Stefan Werner wrote:
On Jul 22, 2008, at 9:58 AM, Steve Checkoway wrote:
with the warning, "warning: cannot pass objects of non-POD type
‘struct foo’ through ‘...’; call will abort at runtime."
Or in other words, the compiler says "I have no idea what to do with
this - I'll compile it anyway and make it look like a crash to your
users."
Pretty much.
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?
Good question. I ran into the same problem and did not find any
solution to this. I think the usual route applies - file bug reports
and hope someone listens.
For those of you Apple folks following along, that bug report would be
<rdar://problem/6092676>.
I'm at loss at how someone could decide that this should be a
warning and not an error. If the compiler can't generate meaningful
code it should just not generate any code at all.
It is technically correct (in the same way that running rogue in
response to #pragma was correct--more so really, since this is
undefined rather than implementation-defined, according to the
standard), but that doesn't make it useful.
--
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