[Issue 24217] New: pragma truncates output at first U+0000 (NUL) character
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Nov 1 21:45:55 UTC 2023
https://issues.dlang.org/show_bug.cgi?id=24217
Issue ID: 24217
Summary: pragma truncates output at first U+0000 (NUL)
character
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: kdevel at vogtner.de
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
--
More information about the Digitalmars-d-bugs
mailing list