[MacPorts] #67890: blink @1.0.0: error: address argument to atomic operation must be a pointer to non-const _Atomic type
MacPorts
noreply at macports.org
Wed Aug 2 16:22:26 UTC 2023
#67890: blink @1.0.0: error: address argument to atomic operation must be a pointer
to non-const _Atomic type
-------------------------+-------------------------
Reporter: ryandesign | Owner: herbygillot
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.8.1
Resolution: | Keywords: highsierra
Port: blink |
-------------------------+-------------------------
Comment (by ryandesign):
Oh. Well you're right, and I misremembered that part. Per
[https://lists.llvm.org/pipermail/cfe-dev/2018-May/058131.html this
discussion] that I linked to in the PHP issue:
>> C11, in its infinite wisdom, decided to drop the const, and C17 will
fix this with DR459
But it also says:
>> I suggest we allow passing const _Atomic(T)* in all versions of C. It
seems silly to special-case C11’s semantics because they allow strictly
less code to work.
And the reply was:
> Your plan sounds fine to me. We generally apply DR resolutions
retroactively.
So in clang 1001 and later, the code should work even in C11 mode. But in
earlier clangs in C11 mode is doesn't.
So one solution remains to make the code C11 compatible by casting away
the `const`ness as I said. Another solution is to require a C17 compiler.
The port does not currently specify a compiler requirement. The project's
README says it only requires a C11 compiler. I
[https://github.com/jart/blink/issues/148 filed a bug report with the
developers] and suggested these two solutions.
--
Ticket URL: <https://trac.macports.org/ticket/67890#comment:2>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list