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: https://github.com/DannyArends/DaNode

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 danode/server.d
  "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.

Reply via email to