Bug 24217 – pragma truncates output at first U+0000 (NUL) character

Status
NEW
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2023-11-01T21:45:55Z
Last change time
2024-12-13T19:31:27Z
Assigned to
No Owner
Creator
kdevel
Moved to GitHub: dmd#20348 →

Comments

Comment #0 by kdevel — 2023-11-01T21:45:55Z
nul1.d: ```d import std.stdio; void main () { enum frag = "\u0000"; enum s = "string t = \"" ~ frag ~ "\";"; pragma (msg, s); writefln!"s = <%s>" (s); } ``` $ dmd nul1.d string t = " $ ./nul1 s = <string t = "";> $ ./nul1 | hexdump -c 0000000 s = < s t r i n g t = 0000010 " \0 " ; > \n 0000016 reminds me of issue #21480
Comment #1 by robert.schadek — 2024-12-13T19:31:27Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/20348 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB