[Bug c/105510] error: initializer element is not constant

2024-07-04 Thread matheus.a.m.moreira at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105510 --- Comment #6 from Matheus Afonso Martins Moreira --- Also ran into this issue today, also involving compound literals in nested structure initialization macros. Because clang accepts this, it compiled fine on my development machine but failed

[Bug c/105510] error: initializer element is not constant

2023-12-04 Thread andy.shevchenko at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105510 Andy Shevchenko changed: What|Removed |Added CC||andy.shevchenko at gmail dot com ---

[Bug c/105510] error: initializer element is not constant

2022-05-09 Thread joseph at codesourcery dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105510 --- Comment #4 from joseph at codesourcery dot com --- We have a documented extension: As a GNU extension, GCC allows initialization of objects with static storage duration by compound literals (which is not possible in ISO C99 because

[Bug c/105510] error: initializer element is not constant

2022-05-09 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105510 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment #3

[Bug c/105510] error: initializer element is not constant

2022-05-09 Thread 570070308 at qq dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105510 --- Comment #2 from 。 <570070308 at qq dot com> --- (In reply to Richard Biener from comment #1) > As a workaround it works with > > struct Test t=(struct Test){1, {3, 4}}; > > I don't think it your way of writing is actually valid though. Yes

[Bug c/105510] error: initializer element is not constant

2022-05-09 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105510 Richard Biener changed: What|Removed |Added Summary|[12] error: initializer |error: initializer element