views:

604

answers:

2

Hi, I was wondering what -fno-omit-frame-pointer will do without optimization?

CXXFLAGS = -Wall -ggdb3 -DDEBUG -fno-omit-frame-pointer

Isn't it that fomit-frame-pointer auto turned on at all levels of -O (except -O0)? I assume in my example it is -O0 by default.

Thanks and regards!

+1  A: 

As I understand it Ox are just shortcuts for a set of optimization flags. The default optimization is zero, so using one flag without Ox, should do just that optimization.

In my opinion, omitting the frame pointer increases debugging difficulty for a modest performance gain.

rpg
+1  A: 

As you already imply yourself, -fno-omit-frame-pointer is just ignored in your case, as the frame pointer wouldn't be ommitted anyways in the default -O0.

ypnos