https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115566
--- Comment #6 from Halalaluyafail3 <luigighiron at gmail dot com> --- (In reply to Andrew Pinski from comment #3) > C11 still has it: > > 6.7.9/14: > An array of character type may be initialized by a character string literal > orUTF−8 string literal, optionally enclosed in braces. > > > > > C23 still does too: > > 6.7.11/15: > > Anarray of character type may be initialized by a character string literal > or UTF-8 string literal, optionally enclosed in braces. > > > The wording here has not changed from C90 either. > > So yes GCC is correct in the pedantic warning here. The way that I interpret this is that an array of character type may be initialized by a character string literal, and a parenthesized string literal has the same semantics as a string literal so it may be used as well (this text is under the semantics section). Also, I don't see how the warning is correct with the interpretation that it has to be specifically an expression that is a string literal and nothing more complicated given that _Generic is accepted.