Bug 18836 – DMD erroneously reports Warning: C preprocessor directive #Author is not supported inside a string.
Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2018-05-06T21:43:26Z
Last change time
2018-05-06T23:16:24Z
Assigned to
No Owner
Creator
Paul Crane
Comments
Comment #0 by viserion.thrall — 2018-05-06T21:43:26Z
In DMD64 D Compiler v2.080.0 I get the following warning from dmd:
Warning: C preprocessor directive #Author is not supported
The code from the unittest:
immutable string tocData = q{
## Author: Alan
## Description: A short description.
## Number: 100
file.d
app.d
app.lua
};
I'm parsing a TOC file like those used in World of Warcraft. See https://wow.gamepedia.com/TOC_format.
Thanks!
Comment #1 by greeenify — 2018-05-06T22:22:18Z
That's not a bug. q strings are supposed to be valid token strings. Use backticks, normal quotes or eof strings if you want arbitrary content.
If that's not highlighted somewhere, please let us know about this place or edit it yourself. Thanks!
Comment #2 by viserion.thrall — 2018-05-06T23:16:24Z
Ah yes! Thanks! I have no idea why I hadn't use quotes. Thanks again!