Bug 19302 – statement not reachable in std.regex.internal.parser.Parser.parseAtom, only in -inline -profile builds
Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2018-10-12T11:07:30Z
Last change time
2019-12-10T10:35:39Z
Assigned to
No Owner
Creator
John Colvin
Comments
Comment #0 by john.loughran.colvin — 2018-10-12T11:07:30Z
// test.d
import std.regex;
regex();
> dmd test.d -inline -profile -w
phobos\std\regex\internal\parser.d(845): Warning: statement is not reachable
It's trivial to fix this bug (just remove the offending "break" in std.regex.internal.parser.Parser.parseAtom), but I'm more interested in why on earth it only occurs with -inline -profile ??