🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #101

Re: preprocessing subterfuge

#101
From: Steve Clamage
Date: Sun, 09 Aug 1992 14:45
43 lines
2256 bytes
mjn@pseudo.uucp (Murray Nesbitt) writes:

>My advice?  Two minutes with a compiler would have saved you an
>afternoon with the Standard.

This is comp.STD.C, intended for discussions about what the Standard says.

Apart from that, suppose a compiler accepts some construct.  Does that
mean the construct is Standard-conforming?  If the compiler rejects it,
is the construct illegal?

When you ask a compiler about what is legal code, you get the union of
1. your own confusions about what you are asking about,
2. different kinds of undefined behavior,
3. the misunderstandings of the compiler writer,
4. bugs in the compiler,
5. deliberate compromises the compiler writer made to accomodate old code.

1.  If you weren't confused, you wouldn't be asking.  Since you are
confused, you might not ask the right question in the right way.

2.  You might be asking about an "unconstrained error", something with
undefined behavior which the compiler is not obligated to diagnose.
That your compiler accepts the code means nothing.  Another compiler
might accept the code with differing results, or reject it.  You might
also have discovered a non-portable extension.

3.  Experienced and knowledgable programmers have misunderstandings, too.
Some "corners" of the language are hard to understand, and compiler
writers don't always get them right.

4.  If you find a compiler without a single bug, please let me know.
(If you can explain how you KNOW it hasn't any bugs, please, PLEASE
tell me!)

5.  In our first effort at making a Standard compiler, we rejected all
non-conforming code.  We quickly found out no one would buy such a
compiler.  We had to allow, at least under some circumstances, even code
which was explictly illegal because our customers demanded compatibility.
-- 

Steve Clamage, TauMetric Corp, steve@taumet.com
Vice Chair, ANSI C++ Committee, X3J16
Technical Details
Message-ID: <1992Aug9.144525.4521@taumet.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!taumet!steve
References: <1992Aug7.001510.13418@mri.com> <MJN.92Aug9024600@pseudo.uucp>

Show Full Headers
Complete Article Headers
Newsgroups: comp.std.c
Path: arc1-ca.pugleaf.net!sparky!uunet!taumet!steve
From: steve@taumet.com (Steve Clamage)
Subject: Re: preprocessing subterfuge
Message-ID: <1992Aug9.144525.4521@taumet.com>
Organization: TauMetric Corporation
References: <1992Aug7.001510.13418@mri.com> <MJN.92Aug9024600@pseudo.uucp>
Date: Sun, 9 Aug 1992 14:45:25 GMT
Lines: 43