public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
From: Nathan Chancellor <nathan@kernel.org>
To: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	David Sterba <dsterba@suse.com>,
	linux-btrfs@vger.kernel.org,
	Nick Desaulniers <nick.desaulniers+lkml@gmail.com>,
	linux-kbuild@vger.kernel.org
Subject: Re: [PATCH 1/2] Kbuild: enable -fms-extensions
Date: Wed, 22 Oct 2025 23:11:33 +0200	[thread overview]
Message-ID: <20251022211133.GA2063489@ax162> (raw)
In-Reply-To: <CAKwiHFiMAm-DX3aERH_F1UooiM1YUiMaax51exhRg2=1ND2VCw@mail.gmail.com>

On Wed, Oct 22, 2025 at 10:35:33PM +0200, Rasmus Villemoes wrote:
> On Wed, 22 Oct 2025 at 18:15, Nathan Chancellor <nathan@kernel.org> wrote:
> >
> > On Mon, Oct 20, 2025 at 04:22:27PM +0200, Rasmus Villemoes wrote:
> 
> > > +# Allow including a tagged struct or union anonymously in another struct/union.
> > > +KBUILD_CFLAGS += -fms-extensions
> > > +
> > > +# For clang, the -fms-extensions flag is apparently not enough to
> > > +# express one's intention to make use of those extensions.
> > > +ifdef CONFIG_CC_IS_CLANG
> > > +KBUILD_CFLAGS += -Wno-microsoft-anon-tag
> > > +endif
> >
> > I think this should go in the first 'ifdef CONFIG_CC_IS_CLANG' block in
> > scripts/Makefile.extrawarn below '-Wno-gnu' with a comment that is
> > similar in nature, which could even be combined like
> >
> >   # The kernel builds with '-std-gnu11' and '-fms-extensions' so the use
> >   # of GNU and Microsoft extensions is acceptable.
> >
> > Other than that, this seems fine to me.
> 
> I honestly had no idea where it was best to put these, and your
> suggestion sounds quite reasonable. I didn't think to look in that
> Makefile.extrawarn as the name suggested that was only about what
> happens with W=1 and higher.

Yeah, we may want to rename that to just Makefile.warn since it
encompasses all warnings since commit e88ca24319e4 ("kbuild: consolidate
warning flags in scripts/Makefile.extrawarn"), which is actually
feedback I gave on the original change:

https://lore.kernel.org/20230811141943.GB3948268@dev-arch.thelio-3990X/

I'll send a patch for that soon.

> Feel free to tweak when applying.

I have tentatively applied this to kbuild-next so that it can spend most
of the cycle in -next to try and catch all potential problems.

Cheers,
Nathan

  reply	other threads:[~2025-10-22 21:11 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-20 14:22 [PATCH 0/2] Kbuild: enable -fms-extensions, make btrfs the first user Rasmus Villemoes
2025-10-20 14:22 ` [PATCH 1/2] Kbuild: enable -fms-extensions Rasmus Villemoes
2025-10-22 16:15   ` Nathan Chancellor
2025-10-22 20:35     ` Rasmus Villemoes
2025-10-22 21:11       ` Nathan Chancellor [this message]
2025-10-23 12:40         ` Nathan Chancellor
2025-10-23 14:17           ` Dave Kleikamp
2025-10-23 16:45             ` Nathan Chancellor
2025-10-20 14:22 ` [PATCH 2/2] btrfs: send: make use of -fms-extensions for defining struct fs_path Rasmus Villemoes
2025-10-20 19:48   ` Linus Torvalds
2025-10-22  5:24     ` David Sterba
2025-10-22  5:30 ` [PATCH 0/2] Kbuild: enable -fms-extensions, make btrfs the first user David Sterba
2025-10-22 16:17   ` Nathan Chancellor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251022211133.GA2063489@ax162 \
    --to=nathan@kernel.org \
    --cc=dsterba@suse.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=nick.desaulniers+lkml@gmail.com \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox