[MacPorts] #70331: gcc14 (c++) can not compile trivial program
MacPorts
noreply at macports.org
Mon Jul 8 12:34:56 UTC 2024
#70331: gcc14 (c++) can not compile trivial program
----------------------+--------------------
Reporter: acmaggs | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: | Keywords:
Port: gcc14 |
----------------------+--------------------
Comment (by szhorvat):
I can't compile any C program that includes `<math.h>`. I'm not sure if
it's the same issue. Example:
{{{
// x.c
#include <math.h>
int main(void) { return 0; }
}}}
`gcc-mp-14 x.c`
The problem is not present with GCC 13.
There are pages of errors that start with:
{{{
/opt/local/lib/gcc14/gcc/arm64-apple-darwin23/14.1.0/include-
fixed/math.h:604:67: error: macro "__API_AVAILABLE2" requires 3 arguments,
but only 2 given
604 | extern float __exp10f(float) __API_AVAILABLE(macos(10.9),
ios(7.0));
|
^
In file included from
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/Availability.h:177,
from /opt/local/lib/gcc14/gcc/arm64-apple-darwin23/14.1.0
/include-fixed/math.h:47:
/opt/local/lib/gcc14/gcc/arm64-apple-darwin23/14.1.0/include-
fixed/AvailabilityInternal.h:255:13: note: macro "__API_AVAILABLE2"
defined here
255 | #define __API_AVAILABLE2(arg0,arg1,arg2) __API_A(arg0)
__API_A(arg1) __API_A(arg2)
| ^~~~~~~~~~~~~~~~
/opt/local/lib/gcc14/gcc/arm64-apple-darwin23/14.1.0/include-fixed/math.h:
In function '__exp10f':
/opt/local/lib/gcc14/gcc/arm64-apple-darwin23/14.1.0/include-
fixed/math.h:604:30: error: expected declaration specifiers before
'__API_AVAILABLE2'
604 | extern float __exp10f(float) __API_AVAILABLE(macos(10.9),
ios(7.0));
| ^~~~~~~~~~~~~~~
}}}
--
Ticket URL: <https://trac.macports.org/ticket/70331#comment:22>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list