[Bug c/111421] constexpr not working with array subscript

2023-09-15 Thread joseph at codesourcery dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111421 --- Comment #4 from joseph at codesourcery dot com --- The definition of constexpr in C2x is intentionally minimal, with potential for future expansion in subsequent standard revisions. Allowing array element accesses would run into needing a

[Bug c/111421] constexpr not working with array subscript

2023-09-15 Thread malekwryyy at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111421 --- Comment #3 from Abdulmalek Almkainzi --- (In reply to jos...@codesourcery.com from comment #1) > See the definitions of "named constant" and "compound literal constant". > Array element accesses aren't allowed, and the example you have wit

[Bug c/111421] constexpr not working with array subscript

2023-09-15 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111421 Marek Polacek changed: What|Removed |Added CC||mpolacek at gcc dot gnu.org

[Bug c/111421] constexpr not working with array subscript

2023-09-15 Thread joseph at codesourcery dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111421 --- Comment #1 from 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 t