% gcc -c tprintf.c
In file included from tprintf.c:2:
/Applications/[Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/time.h:198:67](http://xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/time.h:198:67): error: macro "__API_AVAILABLE2" passed 4 arguments, but takes just 3
198 | __API_AVAILABLE(macosx(10.15), ios(13.0), tvos(13.0), watchos(6.0))
| ^
In file included from /Applications/[Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/Availability.h:173](http://xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/Availability.h:173),
from /Applications/[Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/time.h:68](http://xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/time.h:68):
/opt/gcc-14.1.0-aarch64/lib/gcc/aarch64-apple-darwin21/14.1.0/include-fixed/AvailabilityInternal.h:256:13: note: macro "__API_AVAILABLE2" defined here
256 | #define __API_AVAILABLE2(arg0,arg1,arg2) __API_A(arg0) __API_A(arg1) __API_A(arg2)
| ^~~~~~~~~~~~~~~~
/Applications/[Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/time.h:199:1](http://xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/time.h:199:1): error: expected ';' before 'int'
199 | int timespec_get(struct timespec *ts, int base);
| ^~~
The user had Xcode 15.2. It turns out that
The aarch64 build requires Xcode/Command Line Tools >= 15.3
A build from the GCC sources (rather than the aarch64-modified ones) doesn’t have this issue.
The aarch64-modified sources have been fixed here, and a compiler built from that code base doesn’t have this issue.
With the GCC 14.1.0 (aarch64) release, a user got
The user had Xcode 15.2. It turns out that
The aarch64-modified sources have been fixed here, and a compiler built from that code base doesn’t have this issue.