• 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
gcc parsing error?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gcc parsing error?


  • Subject: gcc parsing error?
  • From: Dave DeLong <email@hidden>
  • Date: Mon, 01 Jun 2009 15:33:06 -0600

Hey everyone,

I'm writing a simple test project to try and isolate some unexpected behavior, and found more unexpected behavior (not what I was looking for).

I'm trying to use a simple NSAssert macro, like so:

NSAssert(NO, [NSString stringWithFormat:@"Caught unexpected exception: %@", e]);

However, when I try to compile, I get the error that "macro NSAssert passed 3 arguments, but takes just 2". To verify what I'm seeing, I tried changing it to:

NSAssert(NO, [NSString stringWithFormat:@"Caught unexpected exception: %@, %@", e, e]);

This tells me I'm passing 4 arguments to NSAssert (instead of the required 2). If I change it to:

NSString *err = [NSString stringWithFormat:@"Caught unexpected exception: %@", e];
NSAssert(NO, err);


That will compile appropriately. It would therefore appear that the statement is not getting correctly parsed.

So my question is: Is this expected/documented behavior? (My searches haven't found anything) If it isn't, is this a known issue? If not, where would be the best place to file a bug?

Thanks,

Dave

_______________________________________________

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


  • Follow-Ups:
    • Re: gcc parsing error?
      • From: Nick Zitzmann <email@hidden>
    • Re: gcc parsing error?
      • From: Ken Thomases <email@hidden>
    • Re: gcc parsing error?
      • From: "Stephen J. Butler" <email@hidden>
  • Prev by Date: SQL store, GC apps, "statement is still active" exception, setReturnsObjectsAsFaults:NO
  • Next by Date: Re: gcc parsing error?
  • Previous by thread: SQL store, GC apps, "statement is still active" exception, setReturnsObjectsAsFaults:NO
  • Next by thread: Re: gcc parsing error?
  • Index(es):
    • Date
    • Thread