Re: [PATCH v2 1/9] Compiler Attributes: Add __must_init macro

From: Kees Cook

Date: Fri Oct 30 2026 - 14:33:22 EST


On Wed, Oct 28, 2026 at 12:02:33PM -0700, Nathan Chancellor wrote:
> On Wed, Oct 28, 2026 at 11:56:08AM -0700, Kees Cook wrote:
> > On Tue, Oct 27, 2026 at 03:38:36PM -0700, Ian Rogers wrote:
> > > Note that Clang does not yet diagnose file-scope objects declared
> > > without any initializer (initializers at file scope that omit the field
> > > are diagnosed), see https://github.com/llvm/llvm-project/issues/232483.
> ...
> > As part of this, can you open a Clang bug for the lack of detecting
> > global initializers? It'd be nice to get that fixed.
>
> Is that this linked issue or a different one? Looks like you filed that
> one and it got fixed in clang ToT about a week ago:
>
> https://github.com/llvm/llvm-project/commit/58936cb3678b4b5b96177f24cac3940b9a389fe3

Oh! Hah, it moved so fast I missed it. Great!

--
Kees Cook