FROM : Jens Alfke
DATE : Sat May 17 02:11:48 2008
On 16 May '08, at 2:34 PM, Bill Bumgarner wrote:
> An almost universal rule of Mac OS X programming: If you see a
> compiler warning, you are doing something wrong.
Amen. One of the first things I do to any Xcode project I work on is
turn on "Treat warnings as errors" in the build settings. For some
reason almost all of Obj-C's type-checking errors appear as warnings,
and you ignore those at your peril.
(I also recommend adding "-Wall" to the "Other warning flags" field.
That enables [almost] all warnings. Yes, you'll sometimes have to
tweak correct code that triggers a warning; but that's much less time
consuming than tracking down a bizarre runtime problem that could have
been detected by the compiler if you'd let it.)
—Jens
DATE : Sat May 17 02:11:48 2008
On 16 May '08, at 2:34 PM, Bill Bumgarner wrote:
> An almost universal rule of Mac OS X programming: If you see a
> compiler warning, you are doing something wrong.
Amen. One of the first things I do to any Xcode project I work on is
turn on "Treat warnings as errors" in the build settings. For some
reason almost all of Obj-C's type-checking errors appear as warnings,
and you ignore those at your peril.
(I also recommend adding "-Wall" to the "Other warning flags" field.
That enables [almost] all warnings. Yes, you'll sometimes have to
tweak correct code that triggers a warning; but that's much less time
consuming than tracking down a bizarre runtime problem that could have
been detected by the compiler if you'd let it.)
—Jens






Cocoa mail archive

