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

--- Comment #11 from Steffen Nurpmeso <steffen at sdaoden dot eu> ---
I had reverted to 14.2.0.
Alejandro, the NUL is not "embedded", it "terminates".
*OR* at least this is what i am used to; for me this is a string literal.

Also to uecker who moves the camel through the eye of the needle:
Dennis Ritchie writes in his "The Development of the C Language"

   C treats strings as arrays of characters conventionally terminated by a
marker. Aside from one special rule about initialization by string literals,
the semantics of strings are fully subsumed by more general rules governing all
arrays, and as a result the language is simpler to describe and to translate
than one incorporating the string as a unique data type.

In the 2nd edition of the C programming language K&R write

  Adjacent string literals are concatenated into a single string. After any
concatenation, a null byte \0 is appended to the string so that programs that
scan the string can find its end.

But i must be very much mistaken if you get two \0\0 in such a case for many
generations of compilers back to around Y2K.

I mean, it could very well be i am, though twenty++ years ago i surely often
looked in assembler output, including .asciz definitions and such.
It is ok for .asciz to simply add a \0, and for .ascii not to.
I just looked, this was documented already Y2K (2.95.3 i started with that).

But really, C frontends -- isn't this a change in actual behavior?
uecker?

Reply via email to