This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]