Opened 3 months ago

Last modified 2 months ago

#70331 closed defect

gcc14 (c++) can not compile trivial program — at Version 1

Reported by: acmaggs (Anthony Maggs) Owned by:
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: gcc14

Description (last modified by jmroot (Joshua Root))

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

Change History (1)

comment:1 Changed 3 months ago by jmroot (Joshua Root)

Description: modified (diff)
Keywords: gcc14 removed
Note: See TracTickets for help on using tickets.