[Bug c/118403] uninitialized warning with automatic union

2025-01-23 Thread stephen at networkplumber dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118403 --- Comment #16 from Stephen Hemminger --- (In reply to Sam James from comment #15) > (In reply to Stephen Hemminger from comment #14) > > (In reply to Sam James from comment #13) > > > (In reply to Stephen Hemminger from comment #12) > > > > >

[Bug c/118403] uninitialized warning with automatic union

2025-01-22 Thread stephen at networkplumber dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118403 --- Comment #14 from Stephen Hemminger --- (In reply to Sam James from comment #13) > (In reply to Stephen Hemminger from comment #12) > > What does `gcc --version` give? $ gcc-15 --version gcc-15 (GCC) 15.0.0 2024 (experimental)

[Bug c/118403] uninitialized warning with automatic union

2025-01-21 Thread stephen at networkplumber dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118403 --- Comment #12 from Stephen Hemminger --- I tried to use the documented flag $ gcc-15 -fzero-init-padding-bits=all gcc-15: error: unrecognized command-line option ‘-fzero-init-padding-bits=all’ gcc-15: fatal error: no input files compilation t

[Bug c/118403] uninitialized warning with automatic union

2025-01-13 Thread stephen at networkplumber dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118403 --- Comment #11 from Stephen Hemminger --- (In reply to Jakub Jelinek from comment #9) > If this is in Linux kernel, I've told the kernel people they should use > -fzero-init-padding-bits=unions because they rely on it for security reasons > and

[Bug c/118403] uninitialized warning with automatic union

2025-01-13 Thread stephen at networkplumber dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118403 --- Comment #8 from Stephen Hemminger --- Created attachment 60139 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=60139&action=edit pre-processed source gcc-15 -Idrivers/net/thunderx/base -I../drivers/net/thunderx/base -Ilib/ethdev -I../l

[Bug c/118403] uninitialized warning with automatic union

2025-01-10 Thread stephen at networkplumber dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118403 --- Comment #5 from Stephen Hemminger --- (In reply to Andrew Pinski from comment #2) > (In reply to Andrew Pinski from comment #1) > > Using `{}` is the correct fix. The referenced part of the C standard here is > > applying to struct and not u

[Bug c/118403] uninitialized warning with automatic union

2025-01-10 Thread stephen at networkplumber dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118403 --- Comment #4 from Stephen Hemminger --- Agree that empty initializer is best for this driver. But other information here. The compile flags for this driver have disabled the warning. cflags += '-Wno-maybe-uninitialized'

[Bug c/118403] New: uninitialized warning with automatic union

2025-01-10 Thread stephen at networkplumber dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118403 Bug ID: 118403 Summary: uninitialized warning with automatic union Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c