This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
-O question
- From: Der Herr Hofrat <der dot herr at mail dot hofr dot at>
- To: gcc-help at gcc dot gnu dot org
- Date: Fri, 12 Jul 2002 14:45:28 +0200 (CEST)
- Subject: -O question
HI !
in the Linux kernel and for some user apps you need to compile with
-O or -O2 to use some of the inline macros, in my case inb/outb etc.
but naturally then you get the jumps in GDB when stepping through the
C-source as -O2 also reorders instruction execution for optimization.
So is there some why of telling gcc to do everything that -O2 would do but
not reorder instructions ??
What I want to get at is, an executable that can use functions that require
optimization flags but without the actual optimization due to loop-unroling
reordering of execution etc.
any hint would be appreciated.
thx !
hofrat