toplev.c and HZ (was: gcc-2.8.0 released)
Jeffrey A Law
law@cygnus.com
Mon Jan 26 07:50:00 GMT 1998
In message < 9801261527.AA07471@kona. >you write:
> I would hope the optimizer would optimize away redundant
> initialization to zero, right? Clearly it should.
No it shouldn't.
There are sometimes reasons to do stuff like
static int debugflags = 0x0
Then later use adb, gdb, emacs, whatever to edit the binary to change
the debug flags in the binary itself.
If gcc optimized debugflags into bss then this kind of action would
not be possible.
jeff
More information about the Gcc
mailing list