I thought I had rid my examples of embedded functions, but one slipped by. As of Xcode 2.2,
gcc prohibits the use of embedded functions — functions declared inside another function or method. Section 23.2, by my oversight, includes at page 380 a function,
IsQuoted, embedded in the
Embedded functions are now prohibited because
gcc implemented them by pushing the code onto the stack, and executing them there. Many security exploits work by executing code injected into the stack, and it is a prudent security measure to make the stack non-executable, even at the expense of embedded functions.
In this case, you can just move the
IsQuoted function outside the
testQuotation method, and the file will compile cleanly.
Thanks to Sabreur for finding the bug.
|@ March 13, 2006 12:00:17 PM CST ( )|
I owe a debt to a reader I'll call Sabreur for submitting an extensive list of errata for Step into Xcode.
I haven't reviewed all of them, but thought it important to get the list out now. The page loses most of the rich-text attributes the author supplied, making some of the notes a bit less clear; I regret that, and will try to make that up as soon as convenient.
I'll log big errors separately.
|@ March 13, 2006 11:48:27 AM CST ( )|