Mark Williams C

Karl Heuer karl at haddock.ima.isc.com
Tue Jun 6 08:48:14 AEST 1989


In article <118 at elf115.uu.net> rec at elf115.uu.net (Roger Critchlow) writes:
>In article <13522 at haddock.ima.isc.com>, karl at haddock.ima.isc.com (Karl Heuer) writes:
>> I think that, instead, I'll add the equivalent of [#undef __STDC__]
>
>Sorry, you aren't allowed to #undef __STDC__ [according to the Standard].

A non-conforming compiler is not bound by the Standard anyway; it knows no law
save that of the marketplace.  In any case, when I said "the equivalent of", I
meant to include measures as drastic as binary-patching the compiler.

>> until someone decides just what __STDC__==0 is supposed to mean.
>
>[It apparently means that the preprocessor agrees with the ANSI specs]

I'm perfectly willing for it to mean that, but there has to be a consensus, if
not a formal standard.  Should I be using #ifdef when I want to test the
preprocessor, and #if when I want to test any other part of the compiler?
What if some other vendor uses __STDC__==0 to mean that their compiler
understands prototypes but not token-pasting?

>The Rationale suggested that: "This macro should be of use in the transition
>toward conformance with the Standard."

It's certainly of such use to users.  I doubt that it was intended to be used
transitionally by implementors.

Karl W. Z. Heuer (ima!haddock!karl or karl at haddock.isc.com), The Walking Lint



More information about the Comp.std.c mailing list