I am using gdb to debug a C++ program.
I have this code:
int x = floor(sqrt(3));
and I want to view the value of x. However, gdb cl
On high optimization levels, the compiler can eliminate intermediate values, as you have seen here. There are a number of options:
-O0 is certain to work (but will be quite a lot slower), -O1 might work okay as well.