Pragma and noalias

Doug Gwyn gwyn at brl-smoke.ARPA
Wed Jun 29 02:59:46 AEST 1988


In article <381 at proxftl.UUCP> bill at proxftl.UUCP (T. William Wells) writes:
>My reasoning is this: in a correct program, where the #pragma
>would be used, the variables referred to are IN FACT not
>aliased. This means that the #pragma has NO effect on the
>results of the program.

Nice try, but no cigar.  "Correct program" is logically prior to
consideration of the effect of #pragma.  The intention, I believe,
was to specify that an arbitrary #pragma-free correct program could
have an arbitrary #pragma inserted at an arbitrary (line boundary)
point and would still be a correct program.  This doesn't fit what
you're trying to do.

I have finally been convinced that whether or not #pragma is really
allowed to affect the semantics of a correct program has not been
clearly specified.  Unless this is remedied, the only safe thing to
do with #pragma will be to not use it.



More information about the Comp.lang.c mailing list