www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/03/24/22:14:36

Message-Id: <s156b744.008@MAIL.TAIT.CO.NZ>
Date: Mon, 25 Mar 1996 15:10:03 +1200
From: Bill Currie <bill_currie AT MAIL DOT TAIT DOT CO DOT NZ>
To: djgpp AT delorie DOT com
Subject: Re: Re: Optimization causes error

On 25/3/96  1:34 am, <j DOT aldrich6 AT genie DOT com> did thus say >>>
> 
> If I remember correctly (not being an assembly programmer myself), can't
> you just use the 'volatile' keyword with the function that contains the asm to
> prevent gcc from optimizing it?  As I recall, 'volatile' tells gcc not
> tooptimize
> any given code/variable it is used with (in addition to its other uses).

I think the 'volatile' functions will still be inlined, just not optimised out or moved
significantly.  I don't actually know, as I don't use that attribute much myself.

Bill

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019