#pragma does only half the job (was Re: Pragma and noalias)
Henry Spencer
henry at utzoo.uucp
Sat Jul 23 03:28:48 AEST 1988
In article <502 at proxftl.UUCP> bill at proxftl.UUCP (T. William Wells) writes:
>"[a pragma] causes the implementation to behave in an
>implementation-defined manner...."
>
>My reading of this says that a pragma changes the implementation,
>not (directly) the interpretation of the program. However, the
>changed implementation must also be conforming. This means that
>it can only change those aspects of the standard which are
>subject to choice, i.e., those things which are implementation
>defined (or one of the other indeterminate characteristics).
Sorry, no. One of the things that is subject to choice is how the
implementation behaves when it sees #pragma! "Conforming" means that
it conforms to a standard which includes section 3.8.6 (#pragma) --
which only says that #pragma does something implementation-defined.
The only restraint this imposes is that the behavior must be documented.
You cannot excise 3.8.6 from the document and then claim that #pragma
must conform to the resulting subset; standards must be taken as a whole.
Your argument works only if you already believe that #pragma is not
allowed to alter the meaning of other parts of the language. This is
circular reasoning. There isn't any way out of it; the (draft) standard
simply does not tell you whether #pragma is allowed to change the rest of
the language or not.
--
Anyone who buys Wisconsin cheese is| Henry Spencer at U of Toronto Zoology
a traitor to mankind. --Pournelle |uunet!mnetor!utzoo! henry @zoo.toronto.edu
More information about the Comp.lang.c
mailing list