Re: [PATCH] Fix initializing a static union variable

From: Herbert Xu
Date: Fri Jun 21 2024 - 07:33:39 EST


On Thu, Jun 20, 2024 at 12:31:46PM -0700, Nick Desaulniers wrote:
>
> Can you also please (find or) file a bug against clang about this? A
> compiler diagnostic would be very very helpful here, since `= {};` is
> such a common idiom.

This idiom is used throughout the kernel. If we decide that it
isn't safe to use then we should change the kernel as a whole rather
than the one spot that happens to have been identified.

Alternatively the buggy compiler should be banned until it's fixed.

Cheers,
--
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt