Re: Dealing with an @available warning

2018-10-25 Thread Saagar Jha
FWIW, I don’t see this in Objective-C++ either. Saagar Jha > On Oct 23, 2018, at 17:54, James Walker wrote: > > On 10/23/18 5:36 PM, Saagar Jha wrote: >> Saagar Jha >>> On Oct 23, 2018, at 17:15, James Walker >> > wrote: >>> >>> On 10/23/18 3:12 PM, Saagar Jha w

Re: Dealing with an @available warning

2018-10-23 Thread James Walker
On 10/23/18 5:36 PM, Saagar Jha wrote: Saagar Jha On Oct 23, 2018, at 17:15, James Walker > wrote: On 10/23/18 3:12 PM, Saagar Jha wrote: What build command are you using? I’m not seeing any warnings with this code, compiled with clang -x objective-c -framewor

Re: Dealing with an @available warning

2018-10-23 Thread Saagar Jha
Saagar Jha > On Oct 23, 2018, at 17:15, James Walker wrote: > > On 10/23/18 3:12 PM, Saagar Jha wrote: >> What build command are you using? I’m not seeing any warnings with this >> code, compiled with clang -x objective-c -framework AppKit >> -Wunguarded-availability -mmacosx-version-min=10.9

Re: Dealing with an @available warning

2018-10-23 Thread James Walker
___ 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.c

Re: Dealing with an @available warning

2018-10-23 Thread James Walker
___ 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.c

Re: Dealing with an @available warning

2018-10-23 Thread Greg Parker
> On Oct 23, 2018, at 3:01 PM, James Walker wrote: > > I had some code like this > > pInfo.orientation = NSPaperOrientationPortrait; > > where pInfo is of type NSPrintInfo*. When compiling with > -Wunguarded-availability, I got a warning saying that > NSPaperOrientationPortrait is only ava

Re: Dealing with an @available warning

2018-10-23 Thread Saagar Jha
What build command are you using? I’m not seeing any warnings with this code, compiled with clang -x objective-c -framework AppKit -Wunguarded-availability -mmacosx-version-min=10.9 - : #import int main() { NSPrintInfo *info; if (@available(macOS 10.9, *)) { inf

Dealing with an @available warning

2018-10-23 Thread James Walker
I had some code like this pInfo.orientation = NSPaperOrientationPortrait; where pInfo is of type NSPrintInfo*. When compiling with -Wunguarded-availability, I got a warning saying that NSPaperOrientationPortrait is only available on macOS 10.9 and later. So I wanted to change it to: if (@a