Skip to content

Add a (temporary) assertion that sizeof(gsize) == sizeof(guintptr)

Simon McVittie requested to merge wip/smcv/gsize-is-guintptr-for-now into main

From: @arichardson

Glib does not yet have a well defined ABI/API for architectures where gsize != guintptr (e.g. CHERI). To enable working on bringup for new architectures this assertion can be disabled with -DG_ENABLE_EXPERIMENTAL_ABI_COMPILATION.

See #2842


I'd like to land this (or something a lot like it) before we consider any more of @arichardson's CHERI porting, to avoid GLib accidentally having a well-defined ABI on CHERI-like architectures before we are ready for it to do so. (Longer reasoning: #2842 (comment 1618926))

Merge request reports