Re: switch() Statement Question



Harald van Dijk <truedfx@xxxxxxxxx> writes:
On Thu, 02 Apr 2009 03:14:00 +0000, Richard Harter wrote:
Permit me to express at least a small bit of skepticism about the
existence of any conforming implementations. This has nothing to do
with the peculiarities of the standard; rather it has to do with the
reality that implementations are, after all, software produced by
fallible human beings. They are at best, best efforts.

If you're talking about bugs in implementations, then it doesn't matter. A
bug doesn't make an implementation non-conforming, and this is
intentional(!) according to the rationale:

"The C99 Committee reviewed several proposed changes to strengthen or
clarify the wording on conformance, especially with respect to
translation limits. The belief was that it is simply not practical to
provide a specification which is strong enough to be useful, but which
still allows for real-world problems such as bugs. The Committee
therefore chose to consider the matter a quality-of-implementation issue,
and to leave translation limits in the standard to give guidance."

I think you're misreading that. That paragraph just talks about
translation limits, not about bugs. For example, a compiler that
fails to diagnose a constraint violation due to a bug is, strictly
speaking, non-conforming.

Of course nearly all software has bugs, and therefore true 100%
conformance to the standard is nearly impossible. But there's a
qualitative difference between a compiler that's non-conforming
because the author hasn't gotten around to implementing a feature yet,
and one that's non-conforming because a typo in the compiler's source
code causes it to fail to diagnose a constraint violation. The
standard makes no distinction between these cases, nor does the
paragraph you quoted from the rationale, but most of would say that
the first compiler is non-conforming, while the second is conforming
(except for that bug).

--
Keith Thompson (The_Other_Keith) kst-u@xxxxxxx <http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
.



Relevant Pages

  • Re: Storgae durations
    ... implementations exist, but where almost every platform in existence is ... standard you referred to is no longer current. ... I don't know exactly which platforms are supported by C99 ... Do *you* use a conforming C99 implementation? ...
    (comp.lang.c)
  • Re: Memory allocation for an initialized character pointer;
    ... Where does the Standard explicitly say that void main ... The Standard grants permission for implementations to define ... It isn't *strictly* conforming, but it is conforming. ...
    (comp.lang.c)
  • Re: Why no folder manipulation in Std C
    ... implementations and pointing to the standard to prove that they're ... conforming, I'd say it was worth the effort. ... users want implementations that are both conforming and useful (and ...
    (comp.std.c)
  • Re: Segmentation Fault....
    ... >> care deeply about what is standard and non-standard in C). ... jn> The C99 standard is the current standard. ... Select conforming feature!= conforming implementation. ... Those conforming features do not always match up with each-other, so you have a situation where you can have a number of C90+some features implementations consuming the same code. ...
    (comp.lang.c)
  • Re: switch() Statement Question
    ... existence of any conforming implementations. ... with the peculiarities of the standard; rather it has to do with the ... reality that implementations are, after all, software produced by ... If you're talking about bugs in implementations, ...
    (comp.lang.c)