Re: [PATCH v2] rust: allow to use INIT_STACK_ALL_ZERO

From: Andrea Righi
Date: Tue Apr 11 2023 - 03:12:04 EST


On Sun, Apr 09, 2023 at 10:49:58PM +0200, Miguel Ojeda wrote:
> On Fri, Apr 7, 2023 at 8:02 AM Andrea Righi <andrea.righi@xxxxxxxxxxxxx> wrote:
> >
> > The check (< 16) looks correct and the comment also looks correct to me,
> > this option will be removed in clang 18, as mentioned here:
> > https://github.com/llvm/llvm-project/blob/llvmorg-16.0.0-rc2/clang/docs/ReleaseNotes.rst#deprecated-compiler-flags
> >
> > (Maybe we could add also this link as a reference)
>
> Thanks for taking a look -- Kees' link added!
>
> I removed "(as the name of the option suggests)" from the commit
> message, by the way, since the name of the option suggests the
> original `-ftrivial` option was to be removed, not the `-enable` one.
> If that understanding is wrong, please let me know!

Yes, that looks more clear, the name of the option is a bit misleading. :)

To be clear what is going to be removed is
-enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang,
in this way clang will be compatible with gcc and they can both use
-ftrivial-auto-var-init=zero.

Thanks,
-Andrea



>
> Cheers,
> Miguel