https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111421
--- Comment #1 from joseph at codesourcery dot com <joseph at codesourcery dot com> --- See the definitions of "named constant" and "compound literal constant". Array element accesses aren't allowed, and the example you have with "->" shouldn't be accepted either (although the standard rules for implementation-defined constant expressions probably allow implementations to accept such an example if they so choose).