Another sizeof question

Henry Spencer henry at zoo.toronto.edu
Sat Nov 17 04:15:41 AEST 1990


In article <3928 at male.EBay.Sun.COM> diamond at tkou02.enet.dec.com (diamond at tkovoa) writes:
>rs>... everything is allowed via a #pragma.  X3J11 reaffirmed at some point
>rs>that the behavior of any program with a #pragma is implementation defined,
>rs>so a #pragma can do anything.
> 
>If this is really true, it defeats the purpose of #pragma.  My understanding
>was that #pragma may have any implementation-defined effect WHICH does not
>change the meaning of a conforming program ...

Sorry, not so.  3.8.6 states simply that #pragma has an implementation-defined
effect.  Period.  No restrictions are explicit, and it does not appear to be
possible to infer them.  (The standard attempt to infer them states that one
must read the standard as a whole, so 3.8.6 is subject to constraints imposed
elsewhere.  The standard counterargument is that the rest of the standard is
subject to the constraint imposed in 3.8.6, i.e. that the presence of a
#pragma has implementation-defined effects, and so nothing can be said about
how the rest of the standard applies in such a situation.)
-- 
"I don't *want* to be normal!"         | Henry Spencer at U of Toronto Zoology
"Not to worry."                        |  henry at zoo.toronto.edu   utzoo!henry



More information about the Comp.std.c mailing list