#pragma
Colin Plumb
w-colinp at microsoft.UUCP
Sat Jan 21 10:09:21 AEST 1989
dlm at cuuxb.UUCP (Dennis L. Mumaugh) wrote:
> Finally, some one has explained the use of pragma!!
>
> In each of the cases the program itself will not change behavior,
> but the object file could be larger or the program could run slower.
>
> The pragma
> #pragma inline
> could mimic the C++ inline function construct and is technically legal
> but gives me a bit of a qualm.
Actually, it's still fine. The rule is (roughly) that deleting all #pragma
lines from the source should not affect the operation of the resultant
executable.
One of the worst offenses I've yet seen was a compiler that "ANSIfied"
its #asm/#endasm by renaming them #pragma asm and #pragma endasm. Sorry,
you should have left them alone. The compiler still would have been
conforming, but another compiler would have been able to barf in the
right place.
--
-Colin (uunet!microsof!w-colinp)
More information about the Comp.std.c
mailing list