Article View: comp.std.c
Article #2130Re: When a compiler must choke
From: Norman Diamond
Date: Thu, 15 Oct 1992 01:35
Date: Thu, 15 Oct 1992 01:35
31 lines
2320 bytes
2320 bytes
In article <ldon82INN7j@exodus.Eng.Sun.COM> linden@positive.Eng.Sun.COM (Peter van der Linden) writes: >Section 2.1.1.3 of the ANSI C standard sayeth: > "A conforming implementation shall produce [a] ... diagnostic message > ... for every translation unit that contains a violation of any syntax > rule or constraint. Diagnostic messages need not be produced in > other circumstances." > >By "syntax rule or constraint", is the standard referring only to the >information contained in its paragraphs headed "Syntax" and "Constraints"? Yes. This involves case-insensitive, quantity-insensitive, comparisons of "syntax" vs. "Syntax" and "constraint" vs. "Constraints" :-) >So, for example, if a program violates something specified only in a >paragraph headed "Implementation limits" or "Semantics", a conforming >implementation is not *obliged* to emit a diagnostic message? True again, it is not obliged. Now for your other question: >Subject: When a compiler must choke The answer is never. If a program violates syntax and/or constraints (with diagnostic) and/or limits and/or semantics (with or without diagnostic) the compiler does not have to choke. It can continue to produce good code (if there exists some meaningful good code and the compiler wishes to do so), or bad code such as something that will post true facts to alt.folklore.urban. -- Norman Diamond diamond@jit081.enet.dec.com If this were the company's opinion, I wouldn't be allowed to post it. "Yeah -- bad wiring. That was probably it. Very bad."
Technical Details
Message-ID:
<1992Oct15.013524.20130@nntpd.lkg.dec.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!iggy.GW.Vitalink.COM!cs.widener.edu!eff!news.byu.edu!hamblin.math.byu.edu!sol.ctr.columbia.edu!zaphod.mps.ohio-state.edu!darwin.sura.net!haven.umd.edu!decuac!pa.dec.com!nntpd2.cxo.dec.com!nntpd.lkg.dec.com!jit345.bad.jit.dec.com!diamondReferences:
<ldon82INN7j@exodus.Eng.Sun.COM>Show Full Headers
Complete Article Headers
Newsgroups: comp.std.c Path: arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!iggy.GW.Vitalink.COM!cs.widener.edu!eff!news.byu.edu!hamblin.math.byu.edu!sol.ctr.columbia.edu!zaphod.mps.ohio-state.edu!darwin.sura.net!haven.umd.edu!decuac!pa.dec.com!nntpd2.cxo.dec.com!nntpd.lkg.dec.com!jit345.bad.jit.dec.com!diamond From: diamond@jit345.bad.jit.dec.com (Norman Diamond) Subject: Re: When a compiler must choke Message-ID: <1992Oct15.013524.20130@nntpd.lkg.dec.com> Sender: usenet@nntpd.lkg.dec.com (USENET News System) Reply-To: diamond@jit.dec.com (Norman Diamond) Organization: Digital Equipment Corporation Japan , Tokyo References: <ldon82INN7j@exodus.Eng.Sun.COM> Date: Thu, 15 Oct 1992 01:35:24 GMT Lines: 31