This is the text of my bug report, in case anyone would rather copy paste.
This was filed at https://bugreport.apple.com/ under "OSX SDK".

---

Summary:
Under GNU gcc, there's a syntax error in ApplicationServices.h if 
$MACOSX_DEPLOYMENT_TARGET has any value less than 10.10.

Steps to Reproduce:
```
$ echo '#include <ApplicationServices/ApplicationServices.h>' | 
MACOSX_DEPLOYMENT_TARGET=10.10 gcc -c -xc -
(it works, no output)

$ echo '#include <ApplicationServices/ApplicationServices.h>' | 
MACOSX_DEPLOYMENT_TARGET=10.9 gcc -c -xc -
In file included from /usr/include/Availability.h:153:0,
                 from 
/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:19,
                 from <stdin>:1:
/System/Library/Frameworks/CoreServices.framework/Frameworks/FSEvents.framework/Headers/FSEvents.h:486:41:
 error: expected ',' or '}' before '__attribute__'
   kFSEventStreamEventFlagItemIsHardlink __OSX_AVAILABLE_STARTING(__MAC_10_10, 
__IPHONE_9_0) = 0x00100000,
                                         ^
```

This is related to the fact that clang supports "enumeration attributes" but 
GNU gcc does not.
http://clang.llvm.org/docs/LanguageExtensions.html#attributes-on-enumerators
https://gcc.gnu.org/onlinedocs/gcc/Attribute-Syntax.html#Attribute-Syntax

The dev forums suggest that "It looks like the macros in Availability.h need an 
"ENUM" variant (like we have for the CF and NS availability macros) to cover 
this case."
https://devforums.apple.com/message/1128923#1128923

Expected Results:
successful compilation

Actual Results:
compilation fails with a syntax error

Version:
osx 10.10.3 (14D131)
xcode Version 6.2 (6C131e)
gcc --version: gcc (GCC) 4.9.2

Notes:
Downstream ticket: http://trac.sagemath.org/ticket/18254

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to