Strange behaviour with -profile
Jesse.K.Phillips+D at gmail.com
Mon Feb 24 16:20:12 PST 2014
On Sunday, 23 February 2014 at 20:46:47 UTC, Jesse Phillips wrote:
> On Sunday, 23 February 2014 at 08:32:50 UTC, Danny Arends wrote:
>> I have a medium sized project at:
>> it compiles fine with the normal build switches I used:
>> $ rdmd --build-only -O -gc -release -w danode/server.d
>> if I compile with the -profile switch, I get a weird error:
>> $ rdmd --build-only -O -gc -release -profile -w
>> "Warning: statement is not reachable"
> I thought DMD provided an error if you tried to optimize with
> debug symbols.
> -O should not be used with -gc, -g, or -profile
> Maybe that will address the problem.
While I think my advice is still correct, I can't seem to find
the combination which caused a compiler message:
dmd -g -O -profile -release -debug -inline test.d
Also found that dub will do the same odd mix of switches:
["profile", "optimize", "inline", "debugInfo"]
Debug and optimize just don't make sense together, and profile
needs debug symbols I thought.
More information about the Digitalmars-d-learn