Nick Sabalausky wrote:
"Nick Sabalausky" <a...@a.a> wrote in message
news:hadst9$58...@digitalmars.com...
"Walter Bright" <newshou...@digitalmars.com> wrote in message
news:hadqcs$30n...@digitalmars.com...
BCS wrote:
Hello Walter,
#ponce wrote:
I think it's disabled in debug mode to keep the compilation time low.
That, and the optimizer tends to scramble the relationship between
source and assembler, making source debugging next to impossible.
How hard would it be to have the code generate run on the unoptimized
code and then do the optimizer backed test and only if no bugs jump out,
move the results into the object file?
It seems even easier to just compile with -0.
It isn't. *Very* typical workflow:
[stuff]
None of those are particularly good options, and I don't see any other
possibilities.
...Plus it's just plain unintuitive.
It's pretty standard, though. For example, there are some bugs which
Visual C++ detects only when the optimiser is on. From memory, they are
all flow-related. The MS docs recommend compiling a release build
occasionally to catch them.