C++ Logo

sg15

Advanced search

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

From: Daniela Engert <dani_at_[hidden]>
Date: Fri, 17 Oct 2025 16:31:43 +0200
Am 17.10.2025 um 16:00 schrieb René Ferdinand Rivera Morell via SG15:
> On Fri, Oct 17, 2025 at 8:53 AM Harald Achitz via SG15
> <sg15_at_[hidden]> wrote:
>
> Today's
>
> void fun(Foo* ptr) {
> my_supper_assert_macro (ptr!=nullpter);
> my_supper_assert_macro(ptr->hasData());
> }
>
> should not have any problems, ever
>
>
> AFAIU, if my_supper_assert_macro implements something equivalent to
> observe, that is still UB at present. Or is it EB now?
No - still UB. The only "instance of EB" right now is the use of values
read from uninitialized variables.

Thanks
Dani

>
> --
> -- René Ferdinand Rivera Morell
> -- Don't Assume Anything -- No Supongas Nada
> -- Robot Dreams - http://robot-dreams.net
>
>
> _______________________________________________
> SG15 mailing list
> SG15_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/sg15


-- 
PGP/GPG: 2CCB 3ECB 0954 5CD3 B0DB 6AA0 BA03 56A1 2C4638C5

Received on 2025-10-17 14:31:50