Closed WebFreak001 closed 5 years ago
Stupid dmd shouldn't be warning on a string literal! Even if it is a token string, it shouldn't be getting semantic warnings.
But still, i guess better to shut it up somehow.
Has the DMD bug been reported on the dlang Bugzilla yet?
On Sun, Nov 11, 2018 at 09:57:20AM -0800, Elias Batek wrote:
Has the DMD bug already been reported on the dlang Bugzilla?
I don't think so.
It should be trivial to reproduce though:
auto a = q{
};
and compile with -wi and it is shown. I suspect the lexer is what generates the warning. The q{} strings pass through the D lexer (this is why they must be valid D tokens) and my guess is it looks at the global warnings flag variable without understanding that it is in a context where it is irrelevant.
include and #define made dmd and ldc very unhappy.
Fixes