[Bug 91] String literals not always properly zero-terminated
gdc-bugzilla at gdcproject.org
gdc-bugzilla at gdcproject.org
Sun Jan 12 08:51:00 PST 2014
http://bugzilla.gdcproject.org/show_bug.cgi?id=91
--- Comment #3 from Johannes Pfau <johannespfau at gmail.com> 2014-01-12 16:51:00 GMT ---
Yes, but string _literals_ must be zero-terminated IIRC. I can't find the
relevant docs on dlang.org but see for example this site:
http://dlang.org/interfaceToC.html "However, string literals in D are 0
terminated."
So doesn't this belong to the string-literal rule?
"0x1.FFFFFFFFFFFFFFFEp-16382" is a string literal and should be zero
terminated. If we then assign this literal to s there's no copy, so I'd expect
s.ptr to point to the literals memory and that should be zero-terminated.
Is there an error in this reasoning?
--
Configure bugmail: http://bugzilla.gdcproject.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.
More information about the D.gnu
mailing list