Re: CGFloat and 64 Bit
Re: CGFloat and 64 Bit
- Subject: Re: CGFloat and 64 Bit
- From: Michael Ash <email@hidden>
- Date: Tue, 10 Feb 2009 11:21:10 -0500
On Tue, Feb 10, 2009 at 10:29 AM, Sean McBride <email@hidden> wrote:
> On 2/9/09 6:48 PM, Clark Cox said:
>
>>> So, I belive #if defined(x) && (x) is good defensive programming.
>>
>>Nope, it's still redundant. And I am 100% sure of that.
>
> So is gcc's -Wundef a leftover from a pre-C89 era? Or is it to help
> keep your code compatible with non-compliant compilers? Or is it just
> useless? :)
Warnings don't have to be undefined or compiler-specific behavior.
Sometimes a warning is just something that someone thought was iffy,
and could either convince the compiler people to put it in or were in
the team and could put it in themselves.
Examples of this abound: -Wconversion, -Wfloat-equal,
-Wimplicit-function-declaration, -Wparentheses, -Wunused, and many
others all warn about code whose behavior is perfectly well defined by
the standard.
It seems that consensus here is that -Wundef is not only warning about
a well defined behavior but is not appropriate in doing so. But that's
also not all that unusual. For example, I find -Wunused-parameter to
be worse than useless in Cocoa programs, and many other examples can
be found, depending on individual tastes.
Mike
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden