public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* how do the -fvolatile- switches work?
@ 2003-10-09  4:34 Marcus Binny
  2003-10-09  4:59 ` Richard Henderson
  2003-10-09  5:02 ` Zack Weinberg
  0 siblings, 2 replies; 5+ messages in thread
From: Marcus Binny @ 2003-10-09  4:34 UTC (permalink / raw)
  To: gcc-help; +Cc: gcc

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: how do the -fvolatile- switches work?
  2003-10-09  4:34 how do the -fvolatile- switches work? Marcus Binny
@ 2003-10-09  4:59 ` Richard Henderson
  2003-10-09  5:02 ` Zack Weinberg
  1 sibling, 0 replies; 5+ messages in thread
From: Richard Henderson @ 2003-10-09  4:59 UTC (permalink / raw)
  To: Marcus Binny; +Cc: gcc-help, gcc

On Wed, Oct 08, 2003 at 09:34:29PM -0700, Marcus Binny wrote:
> I could not figure out how does the -fvolatile or
> -fvolatile-global switches work? 

They don't.  That's why they have been removed.


r~

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: how do the -fvolatile- switches work?
  2003-10-09  4:34 how do the -fvolatile- switches work? Marcus Binny
  2003-10-09  4:59 ` Richard Henderson
@ 2003-10-09  5:02 ` Zack Weinberg
  2003-10-09  5:46   ` Marcus Binny
  1 sibling, 1 reply; 5+ messages in thread
From: Zack Weinberg @ 2003-10-09  5:02 UTC (permalink / raw)
  To: Marcus Binny; +Cc: gcc-help, gcc

Marcus Binny <marcusbinny@yahoo.com> writes:

> I could not figure out how does the -fvolatile or
> -fvolatile-global switches work? 

They don't.  They have been broken since GCC 3.0 and will be removed
entirely in GCC 3.4.

> I wanted -O2 to load globals from memory only. Is that possible from
> command line? without declaring globals volatile.

No.

zw

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: how do the -fvolatile- switches work?
  2003-10-09  5:02 ` Zack Weinberg
@ 2003-10-09  5:46   ` Marcus Binny
  2003-10-09  6:22     ` Zack Weinberg
  0 siblings, 1 reply; 5+ messages in thread
From: Marcus Binny @ 2003-10-09  5:46 UTC (permalink / raw)
  To: Zack Weinberg; +Cc: gcc-help, gcc

> 
> They don't.  They have been broken since GCC 3.0 and
> will be removed
> entirely in GCC 3.4.
> 
what about 2.97?


__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: how do the -fvolatile- switches work?
  2003-10-09  5:46   ` Marcus Binny
@ 2003-10-09  6:22     ` Zack Weinberg
  0 siblings, 0 replies; 5+ messages in thread
From: Zack Weinberg @ 2003-10-09  6:22 UTC (permalink / raw)
  To: Marcus Binny; +Cc: gcc-help, gcc

Marcus Binny <marcusbinny@yahoo.com> writes:

>> 
>> They don't.  They have been broken since GCC 3.0 and
>> will be removed
>> entirely in GCC 3.4.
>> 
> what about 2.97?

There never was an official 2.97 release.  You could be talking about
any development snapshot released from mid-2000 through mid-2001.

2.95 is the last major official release in which the -fvolatile
options are known to have worked.  We do not know, nor do we care,
precisely what change broke them.

zw

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-10-09  6:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-09  4:34 how do the -fvolatile- switches work? Marcus Binny
2003-10-09  4:59 ` Richard Henderson
2003-10-09  5:02 ` Zack Weinberg
2003-10-09  5:46   ` Marcus Binny
2003-10-09  6:22     ` Zack Weinberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).