#error

Norman Diamond diamond at jit345.swstokyo.dec.com
Mon Apr 22 17:51:25 AEST 1991


In article <14793 at darkstar.ucsc.edu> daniel at terra.ucsc.edu (Daniel Edelson) writes:
>There is no constraint to the effect:
>	``The #error directive shall not be present.''
>Therefore, a strictly conforming program may contain #error.

Yes.

>The question is: must a conforming implementation "successfully 
>translate" any strictly conforming program?

Well, implementation limits might be exceeded and can prevent successful
translation, and there's been a moderate amount of discussion about the
meanings of the limits.

>*) If yes, a program containing #error must produce an
>   executable program. Implementations that don't are broken.
>*) If no, a conforming implementation may fail to translate any 
>   program whatsoever.
>What is the correct interpretation?

An implementation could assert a limit of 0 (zero) #error directives,
and reject a program that exceeds this limit.  This is really playing
low.  On the other hand, to require successful acceptance of a program
that contains an #error directive is also playing low, and is doing a
disservice to the programmer (unless the programmer really wanted to
use a #warning directive that does not exist, sigh).  So, you get your
choice, all implementations are correct, all are incorrect, etc.
Let's just say all are ugly.
--
Norman Diamond       diamond at tkov50.enet.dec.com
If this were the company's opinion, I wouldn't be allowed to post it.



More information about the Comp.std.c mailing list