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

Henry Spencer henry at utzoo.uucp
Thu Dec 15 10:58:28 AEST 1988


In article <377 at aber-cs.UUCP> pcg at cs.aber.ac.uk (Piercarlo Grandi) writes:
>    There was never a guarantee that C data had what is now known as the
>    "volatile" property.
>
>You mean that nobody explicitly stated the obvious rule that an optimizer
>shall not turn a correct program into in incorrect one? ...

No, that's not what he meant:  he meant that your definitions of "correct"
and "incorrect" are historically wrong, and do not correspond to the way
C was defined, implemented, and used.  Very little has ever been guaranteed
about how C programs are evaluated, although some C programs (notably the
Unix kernel) have quietly relied on the limitations of old compilers.
ANSI C actually considerably strengthens the guarantees made to the
programmer.

Might one ask how long you have been using C, Mr. Grandi?
-- 
"God willing, we will return." |     Henry Spencer at U of Toronto Zoology
-Eugene Cernan, the Moon, 1972 | uunet!attcan!utzoo!henry henry at zoo.toronto.edu



More information about the Comp.lang.c mailing list