Opened 15 months ago
Last modified 14 months ago
#67890 closed defect
blink @1.0.0: error: address argument to atomic operation must be a pointer to non-const _Atomic type — at Initial Version
Reported by: | ryandesign (Ryan Carsten Schmidt) | Owned by: | herbygillot (Herby Gillot) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.8.1 |
Keywords: | highsierra | Cc: | |
Port: | blink |
Description
On High Sierra and earlier (actually {clang >= 700 < 1001}
as far as I know):
./blink/jit.h:270:10: error: address argument to atomic operation must be a pointer to non-const _Atomic type ('const _Atomic(bool) *' invalid) return atomic_load_explicit(&jit->disabled, memory_order_acquire); ^ ~~~~~~~~~~~~~~
See https://github.com/php/php-src/issues/8881 for some background. It seems that there was a mistake in the original version of the C11 standard (something that should have been const
was defined to be non-const
), which clang obeyed, and which was changed in later versions of the standard; this code appears to be written to the revised C11 standard.
To address that PHP issue, the const
-ness is casted away like this:
browser:macports-ports/lang/php/files/patch-php82-atomic.diff
A similar patch could be written for blink.
Note: See
TracTickets for help on using
tickets.