Re: C aggregate passing (Rust kernel policy)
From: H. Peter Anvin
Date: Thu Feb 27 2025 - 10:31:05 EST
On February 27, 2025 6:21:24 AM PST, Ventura Jack <venturajack85@xxxxxxxxx> wrote:
>On Wed, Feb 26, 2025 at 1:00 PM Martin Uecker <uecker@xxxxxxxxx> wrote:
>>
>> I think C++ messed up a lot (including time-travel UB, uninitialized
>> variables, aliasing ules and much more), but I do not see
>> the problem here.
>
>C++26 actually changes the rules of reading uninitialized
>variables from being undefined behavior to being
>"erroneous behavior", for the purpose of decreasing instances
>that can cause UB. Though programmers can still opt-into
>the old behavior with UB, on a case by case basis, for the
>sake of performance.
>
>Best, VJ.
>
>
Of course, that is effectively what one gets if one treats the compiler warning as binding.