https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116082

--- Comment #2 from Alejandro Colomar <alx at kernel dot org> ---
I agree with martin.

And what if the '\0' is in the middle of the literal?

char x[4] = "a\0b";
char x[3] = "a\0b";
char y[2] = "a\0b";

I'd keep it simple, and assume the \0s in the middle of a string literal are
not our business as far as this diagnostic is concerned.  If we cannot write
the implicit null byte, diagnose.

Reply via email to