This is the mail archive of the
mailing list for the GCC project.
GCC 4.8 and -Og
- From: Jeffrey Walton <noloader at gmail dot com>
- To: gcc at gcc dot gnu dot org
- Date: Sun, 24 Feb 2013 19:57:14 -0500
- Subject: GCC 4.8 and -Og
- Reply-to: noloader at gmail dot com
I read the relase notes on GCC 4.8
(http://gcc.gnu.org/gcc-4.8/changes.html) and -Og caught my eye (the
bulleted item is below).
>From the description, it looks like the switch addresses three issues:
(1) compilation time, (2) 'debugging experience', and (3) runtime
performance. I'm not clear on the debugging experience.
I normally use a debug configuration of "-O0 -g3". -g3 ensure things
like #defines and symbolic constant are available if needed.
What "n" does -Og correspond to for -O and -g (i.e., -O1, -O2; -g2, -g3)?
Is there any interaction with -ggdb? As I understand it, -ggdb is
currently not used for anything even though the man pages tell us its
for GDB extensions.
Is -Og -g3 a valid combination to get the benefits of -Og with maximum
symbol support? Is it even needed?
"A new general optimization level, -Og, has been introduced. It
addresses the need for fast compilation and a superior debugging
experience while providing a reasonable level of runtime performance.
Overall experience for development should be better than the default
optimization level -O0."