[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=wgGhgkEngBBureLRLKe7mQ-sRhYngUQNvxEUqR9mmc60w@mail.gmail.com>
Date: Thu, 21 Mar 2024 11:10:22 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Nathan Chancellor <nathan@...nel.org>
Cc: Greg KH <gregkh@...uxfoundation.org>, Andrew Morton <akpm@...ux-foundation.org>,
Arnd Bergmann <arnd@...db.de>, linux-kernel@...r.kernel.org, llvm@...ts.linux.dev
Subject: Re: [GIT PULL] Char/Misc driver changes for 6.9-rc1
On Thu, 21 Mar 2024 at 06:48, Nathan Chancellor <nathan@...nel.org> wrote:
>
> That build warning actually happens with clang, not GCC as far as I am
> aware, and it is actually a hard build error with older versions of
> clang
So the "labels without a statement" thing is not only a long-time gcc
behavior (admittedly due to a parsing bug), afaik it's becoming
"standard C" in C23.
Does clang have a flag to allow this?
Considering that gcc doesn't warn for it, and that it will become
official at some point anyway, I think this might be a thing that we
might be better off just accepting, rather than be in the situation
where people write code that compiles fine with gcc and don't notice
that clang will error out.
So yes, clang is being correct, but in this case it only causes problems.
Linus
Powered by blists - more mailing lists