• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: @class causing grief
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: @class causing grief


  • Subject: Re: @class causing grief
  • From: Quincey Morris <email@hidden>
  • Date: Tue, 18 Mar 2008 11:08:08 -0700


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 (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


References: 
 >@class causing grief (From: Stuart Malin <email@hidden>)

  • Prev by Date: Getting notifications when any file in a folder change
  • Next by Date: Best way to execute a shell script from a cocoa application
  • Previous by thread: @class causing grief
  • Next by thread: CoreData code working on Tiger - not on Leopard
  • Index(es):
    • Date
    • Thread