https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92773

--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> ---
Smaller testcase:

typedef unsigned char cfg_u8;
typedef union {
 struct {
  cfg_u8 offset;
  cfg_u8 value;
 };

 struct {
  cfg_u8 command;
  cfg_u8 param;
 };
} cfg_reg;

#define FOO { 0x00, 0x00 },
#define FOO1 FOO FOO FOO FOO FOO FOO FOO FOO FOO
#define FOO2 FOO1 FOO1 FOO1 FOO1 FOO1 FOO1 FOO1 FOO1
cfg_reg tas5756m_init_hf3[] = { FOO2 };

now repeat more initializers (the original testcase has plenty).

I'd say the warning should be rate-limited somehow or simply only warn
once per array element type, not for reach element initialized.  In this
case the warning is even questionable since the structs are anonymous?

Reply via email to