https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124088

--- Comment #7 from Matthias Kretz (Vir) <mkretz at gcc dot gnu.org> ---
I assume with "design phase" you mean WG21 design? Or do you mean the design of
the contracts implementation in GCC?

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.

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.

Reply via email to