[GIT PULL] uml-for-6.16-rc4
Linus Torvalds
torvalds at linux-foundation.org
Wed Jun 25 20:48:08 PDT 2025
On Wed, 25 Jun 2025 at 19:44, Tiwei Bie <tiwei.btw at antgroup.com> wrote:
>
> The behavior of gcc and clang differs. Clang's behavior appears to be
> related to the volatile qualifier in arch_spinlock_t:
Ahh. That kind of makes sense.
At the same time, I think clang is being stupid here. Yes, it makes
sense to treat volatile specially in this way - just not for an
initializer.
I realize that initializers can be made to be their own data
structures in modern C (ie taking the address of an initializer and
using the initializer itself as an argument to a function call, for
example), but when an initializer is used to set the value of a
variable, the only real thing there is that variable.
Oh well. The patch certainly looks fine and I obviously already merged
the pull request. It does make me go "I wonder how many other places
clang just generates stupid code due to this".
Linus
More information about the linux-um
mailing list