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

--- Comment #5 from Matthias Kretz (Vir) <mkretz at gcc dot gnu.org> ---
Was the following considered? When compiling with any enforcing contract
evaluation semantic (and a direct or indirect use of contract checks), give
inline functions an ABI tag / different mangling. That way the assumptions in
calling functions cannot be broken via linking. (… except by changing the
predicate in another TU. But I hope we can file that as an ODR violation?)
A lot of C++ code is inline these days and the default is to enforce, so yes,
this can be expensive. But this sounds like a trade-off a user might want to
decide.

Reply via email to