[Issue 21297] New: profile builds in own project fail with 'statement is not reachable' in Phobos' std/concurrency.d
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Oct 8 00:13:58 UTC 2020
https://issues.dlang.org/show_bug.cgi?id=21297
Issue ID: 21297
Summary: profile builds in own project fail with 'statement is
not reachable' in Phobos' std/concurrency.d
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: enhancement
Priority: P1
Component: phobos
Assignee: nobody at puremagic.com
Reporter: zorael at gmail.com
dmd v2.093.1, Manjaro/Arch x86_64.
When trying to build a profile build of my project using dub and `dub -b
profile`, it fails with a warning of 'statement not reachable' in
`std/concurrency.d`.
---
import std;
void main()
{
bool receivedSomething;
static immutable instant = 1.seconds;
thisTid.send(1);
do
{
receivedSomething = receiveTimeout(instant, (Variant v) {});
}
while (receivedSomething);
}
---
dmd -inline -w -profile theabove.d
> /usr/include/dlang/dmd/std/concurrency.d(2087): Warning: statement is not reachable
https://run.dlang.io/is/u7se6m
Both -profile and -inline need to be present.
--
More information about the Digitalmars-d-bugs
mailing list