[llvm-bugs] [Bug 50572] string terminator ZERO missing
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Jun 3 13:04:17 PDT 2021
https://bugs.llvm.org/show_bug.cgi?id=50572
Richard Smith <richard-llvm at metafoo.co.uk> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |INVALID
Status|NEW |RESOLVED
--- Comment #1 from Richard Smith <richard-llvm at metafoo.co.uk> ---
If you ask for an array of exactly four characters and initialize it with a
four-character string, you didn't leave any room for a null terminator, so you
don't get one.
C11 6.7.9/14: "Successive bytes of the string literal (including the
terminating null character if there is room or if the array is of unknown size)
initialize the elements of the array."
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210603/105c0994/attachment.html>
More information about the llvm-bugs
mailing list