[llvm] [clang] [clang-tools-extra] [clang] Fix false positive -Wmissing-field-initializer for anonymous unions (PR #70829)
Mariya Podchishchaeva via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 15 03:08:21 PST 2023
Fznamznon wrote:
@mikaelholmen , thanks for the report. These warnings are kind of expected, there is no big difference between `struct S1 s01 = { 1, {1} };` and `struct S1 s02 = { .d1.a = 1 };` in both cases field `b` of `d1` is not initialized. But they are not expected for C, since we aim to silence missing field initializer warning for designated initializers in C, just to match gcc behavior. It seems the patch broke this "silencing" for nested designators, I'll try to provide the fix shortly. If I'm not able, I'll revert.
https://github.com/llvm/llvm-project/pull/70829
More information about the cfe-commits
mailing list