Path: utzoo!attcan!uunet!timbuk!cs.umn.edu!uc!tut.cis.ohio-state.edu!purdue!decwrl!bacchus.pa.dec.com!decvax.dec.com!decvax!evans From: evans@decvaxdec.com (Marc Evans Ultrix Q/A) Newsgroups: comp.unix.ultrix Subject: Re: Use of 'volatile' on RISC ULTRIX C compiler Message-ID: <397@decvax.decvax.dec.com.UUCP> Date: 11 Oct 90 12:46:58 GMT References: <11190@sybase.sybase.com> Sender: news@decvax.dec.com.UUCP Reply-To: evans@decvax.DEC.COM Organization: Synergytics Lines: 25 In article <11190@sybase.sybase.com>, mcfong@mercury.sybase.com (Martin C. Fong) writes: |> How does the 'volatile' keyword affect the declarations below: |> |> volatile int * a; |> int volatile * b; |> int * volatile c; |> |> All three statements are legal under the RISC ULTRIX C compiler. |> |> Most of the documentation I have (including DEC's) does not elaborate |> enough (for me anyway) on how the 'volatile' declaration should be |> used. Prior to version 2.1 of the MIPS C compiler, use of the volatile keyword will almost always produce a bad program. You should not use it... As far as its intended definition though, it is suppose to comply with the ANSI definition. - Marc -- =========================================================================== Marc Evans - WB1GRH - evans@decvax.DEC.COM | Synergytics (603)635-8876 Unix and X Software Contractor | 21 Hinds Ln, Pelham, NH 03076 ===========================================================================