#pragma does only half the job (was Re: Pragma and noalias)
Henry Spencer
henry at utzoo.uucp
Mon Jul 11 06:11:04 AEST 1988
>... implementation defined means that you can change only a
>very limited subset of things, i.e., those things labeled as
>implementation defined in the standard...
Please justify this with specific citations from X3J11. I spent quite a
while examining the precise semantics of #pragma when I was arguing with
Doug about this; I recall nothing that would support this interpretation.
The words (2ndP.C. draft) are "causes the implementation to behave in an
implementation-defined manner". The definition of "implementation-defined"
just says that it depends on the implementation and must be documented.
Even the original GNU CC semantics -- in which recognition of a #pragma
causes the compiler to try to start one of the usual Unix interactive game
programs -- is technically legitimate, albeit unfriendly.
The fact is that the whole effect of a #pragma is implementation-defined,
and the draft does not specify whether it is allowed to alter the language
semantics. Either interpretation is self-consistent.
--
Anyone who buys Wisconsin cheese is | Henry Spencer @ U of Toronto Zoology
a traitor to mankind. --Pournelle | {ihnp4,decvax,uunet!mnetor}!utzoo!henry
More information about the Comp.lang.c
mailing list