• 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: NS_FORMAT_FUNCTION broken on Xcode 3.2.3?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NS_FORMAT_FUNCTION broken on Xcode 3.2.3?


  • Subject: Re: NS_FORMAT_FUNCTION broken on Xcode 3.2.3?
  • From: Chris Suter <email@hidden>
  • Date: Sat, 28 Aug 2010 06:06:23 +1000

Hi Dave,

On Sat, Aug 28, 2010 at 6:00 AM, Dave MacLachlan <email@hidden> wrote:
Anybody else seeing this?

With -Wformat:

printf("%s", 10) gives me a warning/error
[NSString stringWithFormat:@"%s", 10) compiles happily.

This is with gnuc99 on, and the 10.6 SDK.

NS_FORMAT_FUNCTION is defined as __attribute__((format(__NSString__, 1, 2))

Am I just being stupid? I'm sure this was working on an earlier version of Xcode.

This only works with clang. The support in gcc only goes so far as recognising the attribute; it doesn't actually perform checking.

Kind regards,

Chris

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >NS_FORMAT_FUNCTION broken on Xcode 3.2.3? (From: Dave MacLachlan <email@hidden>)

  • Prev by Date: NS_FORMAT_FUNCTION broken on Xcode 3.2.3?
  • Next by Date: Re: opendiff tool slow to exit
  • Previous by thread: NS_FORMAT_FUNCTION broken on Xcode 3.2.3?
  • Next by thread: Force the usage of g++ instead of gcc
  • Index(es):
    • Date
    • Thread