🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #2781

Re: #error

#2781
From: Norman Diamond
Date: Mon, 22 Apr 1991 07:51
31 lines
2039 bytes
In article <14793@darkstar.ucsc.edu> daniel@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@tkov50.enet.dec.com
If this were the company's opinion, I wouldn't be allowed to post it.
Technical Details
Message-ID: <1991Apr22.075125.6828@tkou02.enet.dec.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!elroy.jpl.nasa.gov!decwrl!pa.dec.com!jrdzzz.jrd.dec.com!tkou02.enet.dec.com!jit345!diamond
References: <14793@darkstar.ucsc.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!elroy.jpl.nasa.gov!decwrl!pa.dec.com!jrdzzz.jrd.dec.com!tkou02.enet.dec.com!jit345!diamond
From: diamond@jit345.swstokyo.dec.com (Norman Diamond)
Newsgroups: comp.std.c
Subject: Re: #error
Message-ID: <1991Apr22.075125.6828@tkou02.enet.dec.com>
Date: 22 Apr 91 07:51:25 GMT
References: <14793@darkstar.ucsc.edu>
Sender: usenet@tkou02.enet.dec.com (USENET News System)
Reply-To: diamond@jit345.enet@tkou02.enet.dec.com (Norman Diamond)
Organization: Digital Equipment Corporation Japan , Tokyo
Lines: 31