www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 21297] New: profile builds in own project fail with


          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 puremagic.com
          Reporter: zorael 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


import std;

void main()
    bool receivedSomething;
    static immutable instant = 1.seconds;

        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
https://run.dlang.io/is/u7se6m Both -profile and -inline need to be present. --
Oct 07 2020