Re: [MacPorts] #70170: ctpv @1.1: error: expected ‘;’, ‘,’ or ‘)’ before ‘__VA_OPT__’
MacPorts
noreply at macports.org
Sat Oct 12 15:26:54 UTC 2024
#70170: ctpv @1.1: error: expected ‘;’, ‘,’ or ‘)’ before ‘__VA_OPT__’
---------------------------+-------------------------
Reporter: barracuda156 | Owner: suhailskhan
Type: defect | Status: reopened
Priority: Normal | Milestone:
Component: ports | Version: 2.9.3
Resolution: | Keywords:
Port: ctpv |
---------------------------+-------------------------
Comment (by barracuda156):
Replying to [comment:10 suhailskhan]:
> >Blacklisting old compilers is not necessarily the solution we want. For
example, if the only problem is that this code needs C99, then gcc 4.2
supports C99 and should simply be instructed to use it via the -std=c99 or
-std=gnu99 flag.
>
> After looking more into this, I found that `__VA_OPT__` is a C23/C++20
feature.
>
> Replacing the `compiler.blacklist-append` line with
`compiler.cxx_standard 2020` may be the correct solution. It fixes the
build when I tested it on Snow Leopard, and hopefully should for Leopard
and preview builds of Snow Leopard as well. I tried using
`compiler.c_standard 2023` as well, but the build failed.
If it uses modern C++ specifically, then portfile must have
`compiler.cxx_standard`, blacklist won’t work correctly (since C++
standard does more that compiler choice).
--
Ticket URL: <https://trac.macports.org/ticket/70170#comment:11>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list