C++ Logo

sg15

Advanced search

Re: [isocpp-sg15] [isocpp-sg21] P3835 -- Different contract checking for different libraries

From: Peter Bindels <dascandy_at_[hidden]>
Date: Tue, 21 Oct 2025 10:01:00 +0200
On Tue, Oct 21, 2025 at 9:55 AM Ville Voutilainen via SG15 <
sg15_at_[hidden]> wrote:

> You're jumping into a conjecture a bit there. :) I'm not saying that
> we would want those unsound optimizations to be conforming. But as far
> as I understand,
> they are not conforming anyway. Clang doesn't perform them, and didn't
> need P2900 to avoid them. GCC's optimizer has a bug, with or without
> P2900.
> The GCC contracts implementation performs a dirty hack to work around
> that problem by hoodwinking the optimizer to not see the terminate()
> call,
> by wrapping it in a wrapper function attributed with [[gnu::noipa]],
> because none of the developers of that implementation have the
> expertise to fix the optimizer bug.
>

Don't make personal attacks. This is uncalled for.

Received on 2025-10-21 08:01:14