Path: utzoo!utgpu!attcan!uunet!seismo!sundc!pitstop!sun!quintus!ok From: ok@quintus.uucp (Richard A. O'Keefe) Newsgroups: comp.lang.c Subject: Re: const, volatile, etc [was Re: #defines with parameters] Message-ID: <873@quintus.UUCP> Date: 15 Dec 88 22:49:56 GMT References: <674@quintus.UUCP> <117@halcdc.UUCP> <468@auspex.UUCP> <9016@smoke.BRL.MIL> <10919@ulysses.homer.nj.att.com> <1450@micomvax.UUCP> <369@aber-cs.UUCP> <9143@smoke.BRL.MIL> <377@aber-cs.UUCP> Sender: news@quintus.UUCP Reply-To: ok@quintus.UUCP (Richard A. O'Keefe) Distribution: eunet,world Organization: Quintus Computer Systems, Inc. Lines: 16 In article <377@aber-cs.UUCP> pcg@cs.aber.ac.uk (Piercarlo Grandi) writes: >This volatile argument is as old as programming; every PL/1 >programmer knows that many a compiler will generate buggy code when the >optimizer is let loose on code with exception handlers. >They do not think that that is a fault of the language, they rightly think >that it is the compiler that is wrong, and they greatly resent having to use >a compiler option to influence the semantics of a piece of code (ahhhh, if >only PL/1 included volatile for variables, instead of only for procedures! :->). (a) It's PL/I, not PL/1. (b) PL/I *does* include "volatile" for variables. There are two pairs of attributes: IRREDUCIBLE/REDUCIBLE and ABNORMAL/NORMAL. The default in PL/I is as in dpANS C: if you do not explicitly say otherwise the compiler will assume a variable is _not_ "volatile".