On Mar 18, 2008, at 10:18, Stuart Malin wrote:

The compiler will report "parse error before 'AT_NAME' token for the line
@class  SomeClassB;
yet the problem is on the _prior_ line -- the missing semicolon at the end -- and so the token "SomeClassA" ends up not being defined (which is why the compiler will also report "parse error before 'SomeClassA'" for the line
        SomeClassA              *someClassA;


To be even blunter about it, the gcc is striking in its dogged reporting of the point at which the error was detected, not the point at which the error occurred. (The latter is harder to do of course. I think I've never seen a commercial-grade compiler before gcc that made *no* attempt to find the point of occurrence, at least in the easy cases.)

Consequently, gcc doesn't attempt much in the way of error recovery, such as the common case of assuming a missed semi-colon so as not to mess up the following statement or declaration.

In most cases, none of this matters for a fast-turn-around compiler, but there will always be some simple errors like the one in this thread that cause some wasteful head scratching.

But I've gone OT. Sorry.

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to