Re: C aggregate passing (Rust kernel policy)
From: H. Peter Anvin
Date: Tue Feb 25 2025 - 10:43:39 EST
On February 22, 2025 2:03:48 AM PST, Ventura Jack <venturajack85@xxxxxxxxx> wrote:
>>Gcc used to initialize it all, but as of gcc-15 it apparently says
>>"Oh, the standard allows this crazy behavior, so we'll do it by
>default".
>>
>>Yeah. People love to talk about "safe C", but compiler people have
>>actively tried to make C unsafer for decades. The C standards
>>committee has been complicit. I've ranted about the crazy C alias
>>rules before.
>
>Unsafe Rust actually has way stricter rules for aliasing than C. For you
>and others who don't like C's aliasing, it may be best to avoid unsafe Rust.
From what I was reading in this tree, Rust doesn't actually have any rules at all?!