Re: Rust kernel policy
From: H. Peter Anvin
Date: Thu Feb 20 2025 - 07:14:18 EST
On February 20, 2025 4:01:28 AM PST, "H. Peter Anvin" <hpa@xxxxxxxxx> wrote:
>On February 19, 2025 10:32:15 PM PST, Alexey Dobriyan <adobriyan@xxxxxxxxx> wrote:
>>On Wed, Feb 19, 2025 at 11:33:56AM -0800, H. Peter Anvin wrote:
>>> b. Can we use existing mature tools, such as C++, to *immediately* improve the quality (not just memory safety!) of our 37-year-old, 35-million line code base and allow for further centralized improvements without the major lag required for compiler extensions to be requested and implemented in gcc (and clang) *and* dealing with the maturity issue?
>>
>>We can't and for technical reasons:
>>
>>* g++ requires C99 initializers to be in declaration order,
>> even in cases where there is no reason to do so.
>>
>>* g++ doesn't support __seg_gs at all:
>>
>> $ echo -n -e 'int __seg_gs gs;' | g++ -xc++ - -S -o /dev/null
>> <stdin>:1:14: error: expected initializer before ‘gs’
>>
>> x86 added this to improve codegen quality so this would be step backwards.
>
>Ok, so those are obvious problems, and I agree that having to rely on the legacy implementation of gs: is undesirable as anything than a transaction crutch.
>
>
Make that *transition* crutch. Stupid autocorrect.