Opened 11 months ago

Last modified 11 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):

https://build.macports.org/builders/ports-10.13_x86_64-builder/builds/200034/steps/install-port/logs/stdio

./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.

Change History (0)

Note: See TracTickets for help on using tickets.