const, volatile, etc [was Re: #defines with parameters]

Richard A. O'Keefe ok at quintus.uucp
Fri Dec 16 08:49:56 AEST 1988


In article <377 at aber-cs.UUCP> pcg at 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".



More information about the Comp.lang.c mailing list