how do the -fvolatile- switches work?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux