Opened 3 months ago
Last modified 2 months ago
#70331 closed defect
gcc14 (c++) can not compile trivial program — at Initial Version
Reported by: | acmaggs (Anthony Maggs) | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | Cc: | ||
Port: | gcc14 |
Description
Macbook Air m1, sonoma 14.5 apple command line tools installed: clang -v Apple clang version 15.0.0 (clang-1500.3.9.4) Target: arm64-apple-darwin23.5.0
Take the program:
#include <iostream> int main(int argc, char * argv[]){ }
compile:
g++-mp-14 j.cc
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/wchar.h:90,
from /opt/local/include/gcc14/c++/cwchar:44, from /opt/local/include/gcc14/c++/bits/postypes.h:40, from /opt/local/include/gcc14/c++/iosfwd:42, from /opt/local/include/gcc14/c++/ios:40, from /opt/local/include/gcc14/c++/ostream:40, from /opt/local/include/gcc14/c++/iostream:41, from j.cc:1:
/opt/local/lib/gcc14/gcc/arm64-apple-darwin23/14.1.0/include-fixed/stdio.h:383:153: error: macro "API_AVAILABLE4" requires 5 arguments, but only 4 given
383 | FILE *fmemopen(void * restrict buf, size_t size, const char * restrict mode) API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
|
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/Availability.h:177,
from /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/wchar.h:72:
/opt/local/lib/gcc14/gcc/arm64-apple-darwin23/14.1.0/include-fixed/AvailabilityInternal.h:257:13: note: macro "API_AVAILABLE4" defined here
257 | #define API_AVAILABLE4(arg0,arg1,arg2,arg3,arg4) API_A(arg0) API_A(arg1) API_A(arg2) API_A(arg3) API_A(arg4)
|
~
/opt/local/lib/gcc14/gcc/arm64-apple-darwin23/14.1.0/include-fixed/stdio.h:384:119: error: macro "API_AVAILABLE4" requires 5 arguments, but only 4 given