------- Comment #1 from howarth at nitro dot med dot uc dot edu  2010-07-18 
18:48 -------
Note that this issue only occurs in darwin10 because of the introduction of ...

#if defined(__GNUC__) && (__GNUC__*10+__GNUC_MINOR__ >= 42) &&
!defined(__INTEL_COMPILER) && (TARGET_OS_MAC || TARGET_OS_EMBEDDED)
#define CF_FORMAT_FUNCTION(F,A) __attribute__((format(CFString, F, A)))
#define CF_FORMAT_ARGUMENT(A) __attribute__((format_arg(A)))
#else
#define CF_FORMAT_FUNCTION(F,A)
#define CF_FORMAT_ARGUMENT(A)
#endif

in /System/Library/Frameworks/CoreFoundation.framework/Headers/CFString.h which
makes the assumption that all gcc greater than gcc 4.2 supports the CFString
format. I had suggested in radar 6845745 that this be fixed in darwin10 with...

 ---
/System/Library/Frameworks/CoreFoundation.framework/Headers/CFString.h.orig
2009-04-30 20:23:48.000000000 -0400
+++ /System/Library/Frameworks/CoreFoundation.framework/Headers/CFString.h     
2009-04-30 22:41:41.000000000 -0400
@@ -153,7 +153,7 @@
 #define CFSTR(cStr)  __CFStringMakeConstantString("" cStr "")
 #endif

-#if defined(__GNUC__) && (__GNUC__*10+__GNUC_MINOR__ >= 42) &&
!defined(__INTEL_COMPILER) && (TARGET_OS_MAC || TARGET_OS_EMBEDDED)
+#if defined(__GNUC__) && (__APPLE_CC__ > 5600) && (__GNUC__*10+__GNUC_MINOR__
>= 42) && !defined(__INTEL_COMPILER) && (TARGET_OS_MAC || TARGET_OS_EMBEDDED)
 #define CF_FORMAT_FUNCTION(F,A) __attribute__((format(CFString, F, A)))
 #define CF_FORMAT_ARGUMENT(A) __attribute__((format_arg(A)))
 #else

but I don't think this will ever happen for darwin10. Mike has suggested that
better fix is to add port over the support for the CFString format.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44981

Reply via email to