[Bug c/92773] [8/9/10 Regression] GCC compilation with big array / header is infinite
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Dec 5 08:20:00 GMT 2019
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?
More information about the Gcc-bugs
mailing list