NSCAssert in OS X and iOS
I had an NSAssert with varargs in a C routing in a .mm file. It compiled fine in a Mac OS X app, but the same code in an iOS app bitches about too many arguments. Is that right? The iOS project where it's failing hasn't been built in a few months, so I wonder if there might be some leftover cruft in a project setting? It's set to target the latest iOS SDK... -- Rick ___ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: NSCAssert in OS X and iOS
On Apr 18, 2013, at 12:14 AM, Rick Mann rm...@latencyzero.com wrote: I had an NSAssert with varargs in a C routing in a .mm file. It compiled fine in a Mac OS X app, but the same code in an iOS app bitches about too many arguments. Is that right? Double-check that the warning isn't in fact correct. Clang has recently (since Xcode 4.5?) gotten better at sanity-checking printf-style parameter lists, which I find to be a real life-saver. It's possible that your iOS target has this warning enabled but the OS X target doesn't. —Jens ___ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: NSCAssert in OS X and iOS
Well, it still builds correctly in the OS X project (it's common utility code I use across projects). The line is: enum AnchorRegion inRgn = ...; NSCAssert(false, @Unknown AnchorRegion %d, inRgn); On Apr 18, 2013, at 09:31 , Jens Alfke j...@mooseyard.com wrote: On Apr 18, 2013, at 12:14 AM, Rick Mann rm...@latencyzero.com wrote: I had an NSAssert with varargs in a C routing in a .mm file. It compiled fine in a Mac OS X app, but the same code in an iOS app bitches about too many arguments. Is that right? Double-check that the warning isn't in fact correct. Clang has recently (since Xcode 4.5?) gotten better at sanity-checking printf-style parameter lists, which I find to be a real life-saver. It's possible that your iOS target has this warning enabled but the OS X target doesn't. —Jens -- Rick ___ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: NSCAssert in OS X and iOS
Le 18 avr. 2013 à 18:31, Jens Alfke j...@mooseyard.com a écrit : On Apr 18, 2013, at 12:14 AM, Rick Mann rm...@latencyzero.com wrote: I had an NSAssert with varargs in a C routing in a .mm file. It compiled fine in a Mac OS X app, but the same code in an iOS app bitches about too many arguments. Is that right? Double-check that the warning isn't in fact correct. Clang has recently (since Xcode 4.5?) gotten better at sanity-checking printf-style parameter lists, which I find to be a real life-saver. It's possible that your iOS target has this warning enabled but the OS X target doesn't. This is a known issue that was recently solved on OS X. Declaration of NSAssert macros in (Obj-)C++ mode are broken (they don't use the vararg macro syntax that is supported by recent c++ compiler). I didn't tried on iOS, but I suspect this is the very same issue that is not yet fixed in the SDK you are using. -- Jean-Daniel ___ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com