Bug in new K&R?
Doug Gwyn
gwyn at brl-smoke.ARPA
Wed May 11 23:27:02 AEST 1988
In article <7288 at bellcore.bellcore.com> sjs at spectral.UUCP (Stan Switzer) writes:
>To this I can only ask: "Why are there STILL dark corners?"
That has a simple answer. C's type system has dark corners because of
the way it evolved. There are too many cases where types are "sort of
the same", but not identical. The proposed ANSI C standard has managed
to bring some semblance of order to this mess, but it cannot just change
to a clean, rigorous type system, since one of its main goals is to
accommodate existing practice rather than to totally supplant it.
>... but it really isn't fair to defend a standard by calling a
>reasonable construction a "dark corner" of the language.
I don't know how you read that into what I had said: "Personally I
wouldn't have tried writing code that explores the dark corners of the
language like that ..." How does my personal C usage style relate to
a "defense of the standard"? Dark corners are dark corners whether or
not they are theoretically well defined, just as dark alleys may be
unsafe even though the law says thou shalt not be mugged in one.
>... I can't help but be nostalgic for the days when "pcc"
>itself was the "standard" against which C compilers were compared
>(syntacticly speaking) and when the only sensible measure of a C
>compiler other than recognizing pcc's language was that it ran
>code that ran on VAXes (modulo byte order and char signedness).
You must have moved in different circles than I did. Far from being a
correctness criterion, it has been well-known that PCC did several
things wrong. One would also think that Ritchie's compiler would have
precedence over Johnson's. In any case, there always was a problem
with the exact definition of C, just that people who used nothing but
PCC never noticed the problem.
>...there is good reason to fear that a lot of houey will be sold under
>the banner "standard conforming" ...
I know of two ANSI C validation suites in progress and I suspect there
may be others. There will therefore be tools for C compiler customers
to check that vendor offerings are indeed standard conforming. Whether
or not a conforming implementation will be widely useful or will have
obnoxious limitations is something that the marketplace will have to
shake out.
More information about the Comp.lang.c
mailing list