This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
how do the -fvolatile- switches work?
- From: Marcus Binny <marcusbinny at yahoo dot com>
- To: gcc-help at gcc dot gnu dot org
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 8 Oct 2003 21:34:29 -0700 (PDT)
- Subject: how do the -fvolatile- switches work?
I could not figure out how does the -fvolatile or
-fvolatile-global switches work?
for code like
extern int flag;
void foo ()
{
while (!flag) ;
}
-O2 keeps flag into a register only. I tried
-fvolatile switches but no help. I wanted -O2 to load
globals from memory only. Is that possible from
command line? without declaring globals volatile.
M
__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com