https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124088
--- Comment #8 from Iain Sandoe <iains at gcc dot gnu.org> ---
(In reply to Matthias Kretz (Vir) from comment #7)
> I assume with "design phase" you mean WG21 design?
Yes.
> As far as I've heard/read from contracts designers, implementations are
> supposed to have *a lot* of freedom in how to implement it. And I understand
> comment 5 as one possible point in the space that is allowed by the spec.
>
> The current mangling says "no assumptions from contracts", obviously. Adding
> a new mangling for inline functions with assumptions derived from contract
> checks wouldn't even need to be part of the shared ABI spec (other than
> reserving the mangling, I guess).
>
> As a proof-of-concept, I guess we could [[gnu::abi_tag("assume")]] all
> inline functions and disable contracts-conservative-ipa.
We will have various quite unhappy people ( including the macOS/Darwin
maintainer ;) ) if we cannot interoperate with clang - so we'd need to make an
agreement within the Itanium sphere, at least.
> Users then would get the guarantee that TUs compiled with enforcing semantic
> always get some enforcing semantic and TUs compiled with ignore or observe
> never get their contract checks enforced.
well there are, as observed in the discussions of National Body comments on the
current WD implications in publishing information in the function signature. I
think you are proposing that a mismatch would not link. Presumably, that
solution was already rejected for some reason.
It is a pattern that everyone newly encountering this scenario asks a series of
similar questions; hence it is better asked in the WG21 forum where there are
folks who know the whole history of the design.