https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84685
Cyril Hrubis <chrubis at suse dot cz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |chrubis at suse dot cz --- Comment #4 from Cyril Hrubis <chrubis at suse dot cz> --- Created attachment 48519 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48519&action=edit Simplified reproducer. I got a plenty of these useless warnings as well for LTP https://github.com/linux-test-project/ltp. It also looks like the warning is not printed in the compound literal is last in the structure. In my case swapping struct bar *b and int a silences the warning.