Re: C aggregate passing (Rust kernel policy)

H. Peter Anvin
2025-02-25T15:42:29Z

On February 22, 2025 2:03:48 AM PST, Ventura Jack <venturajack85@gmail.com> 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?!