Re: [PATCH 2/2] kbuild: Use '-fms-anonymous-structs' if it is available

From: Nicolas Schier

Date: Thu Mar 05 2026 - 05:31:08 EST


On Mon, 23 Feb 2026 12:10:29 -0700, Nathan Chancellor <nathan@xxxxxxxxxx> wrote:
> Clang recently added '-fms-anonymous-structs' [1] to specifically enable
> the Microsoft tagged anonymous structure / union extension, for which
> the kernel added '-fms-extensions' in commit c4781dc3d1cf ("Kbuild:
> enable -fms-extensions"). Switch to this more narrow option if it is
> available, which would have helped avoid the issue addressed by
> commit a6773e6932cb ("jfs: Rename _inline to avoid conflict with clang's
> '-fms-extensions'"). GCC has talked about adding a similar flag [2] as
> well but potentially naming it differently.
>
> [...]

Reviewed-by: Nicolas Schier <nsc@xxxxxxxxxx>

--
Nicolas