Opened 15 years ago
Closed 15 years ago
#477 closed discussion (wontfix)
compiler do optimize in --enable-debug mode
Reported by: | Peter | Owned by: | Jari Häkkinen |
---|---|---|---|
Priority: | trivial | Milestone: | |
Component: | build | Version: | trunk |
Keywords: | Cc: |
Description
If --enable-debug
is given to ./configure
we will set AM_CXXFLAGS = -O
, which is equivalent with -O1
.
Is this really the intention? I though we wanted no optimizations in --enable-debug
mode. No optimization is performed if we pass -O0
(which is default so it could be omitted).
http://www.redhat.com/docs/manuals/enterprise/RHEL-3-Manual/gcc/optimize-options.html
Change History (2)
comment:1 Changed 15 years ago by
comment:2 Changed 15 years ago by
Milestone: | yat 0.5 |
---|---|
Resolution: | → wontfix |
Status: | new → closed |
OK. Only reason not to optimize would be speed (when developing compilation is performed more than once), but I don't know how much we are talking about. OTOH, I guess the compiler need to optimize to find, for example, variables not used and warn about it.
Usually one sees -g -O at the same time, at least with gnu compilers. I suppose it is safe with GCC. From man gcc and man g++:
I think we should leave it as it is.