Article View: comp.std.c++
Article #2795Re: Standard C++ Macro
From: Jerry Coffin
Date: Fri, 01 Dec 1995 16:04
Date: Fri, 01 Dec 1995 16:04
33 lines
1757 bytes
1757 bytes
Sean A Corfield <sean@corf.demon.co.uk> wrote:
>Interestingly (or not) there's nothing to prevent a NON-conforming C
>compiler from predefining __STDC__ to be 1! I recall a well-known compiler
>which predefined __STDC__ as zero (unless in ansi compliant mode) -- this
>wreaked havoc with code that simply had:
It's a tautology that the standard has no control over non-standard
compilers...
> #ifdef __STDC__
> /* oh, good, it's a conforming compiler! */
> #endif
>The C++ draft requires __cplusplus to be predefined but sensibly, IMO,
>does not attempt to overspecify conformance the way ISO C attempted.
I can't really argue much with this. When they first decided __STDC__
should be defined by by conforming compilers, it seemed a reasonable
idea, but seems to me to have accomplished little.
Later,
Jerry.
/* I can barely express my own opinions; I certainly can't
* express anybody else's.
*
* The universe is a figment of its own imagination.
*/
[ comp.std.c++ is moderated. Submission address: std-c++@ncar.ucar.edu.
Contact address: std-c++-request@ncar.ucar.edu. The moderation policy
is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
Technical Details
Message-ID:
<49m4kj$d6v@natasha.rmii.com>Path:
arc1-ca.pugleaf.net!engnews1.Eng.Sun.COM!taumet!clamageReferences:
<49kois$gqr@engnews1.eng.sun.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!engnews1.Eng.Sun.COM!taumet!clamage From: jcoffin@rmii.com (Jerry Coffin) Newsgroups: comp.std.c++ Subject: Re: Standard C++ Macro Date: 1 Dec 1995 16:04:12 GMT Organization: TAEUS Approved: clamage@eng.sun.com (comp.std.c++) Message-ID: <49m4kj$d6v@natasha.rmii.com> References: <49kois$gqr@engnews1.eng.sun.com> NNTP-Posting-Host: taumet.eng.sun.com Content-Type: text X-Nntp-Posting-Host: slip8145.rmii.com X-Newsreader: Forte Free Agent 1.0.82 Content-Length: 975 X-Lines: 29 Originator: clamage@taumet