🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c++
Article #2794

Re: Standard C++ Macro

#2794
From: J. Kanze
Date: Fri, 01 Dec 1995 19:16
42 lines
2214 bytes
Jerry Coffin (jcoffin@rmii.com) wrote:
|> Amol_Khedkar@bocagate.bocaraton.ibm.com wrote:

|> [ ... ] 

|> >>#ifdef _STD_C_
|> >>/*  stuff  that requires ANSI-compliance */
|> >>#endif
|> >>
|> >[text deleted]

|> >I don't believe that ANSI dictates the existence of such a macro. I could be
|> >wrong on this one. However, if I remember correctly, MS C 6.0 defined a macro
|> >__STDC__ and IBM C-Set++ defines one called __ANSI__. I believe this varies
|> >with the compiler that you're using. Check the compiler documentation.

|> The C standard requires that __STDC__ be defined to the value 1.

Of course, the C standard only makes requirements concerning standard
conforming compilers.  It has nothing to say about compilers which do
not conform to the standard.  In particular, such a compiler could also
define __STDC__ as 1.

In fact, of course, this is generally the case.  A compiler with defects
generally fails to conform because of those defects.  This includes all
of the so-called ANSI C compilers that I've tried, and they all still
define __STDC__ as 1.

This is not to belittle ANSI's adopting this definition; it is just a
warning to beware.  Read your compiler's documentation, and experiment.
-- 
James Kanze           (+33) 88 14 49 00          email: kanze@gabi-soft.fr
GABI Software, Sarl., 8 rue des Francs Bourgeois, 67000 Strasbourg, France
Conseils, études et réalisations en logiciel orienté objet --
              -- A la recherche d'une activité dans une region francophone


---
[ 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: <49ml6e$bbg@gabi.gabi-soft.fr>
Path: arc1-ca.pugleaf.net!howland.reston.ans.net!agate!agate!Matt
References: <4998dt$j01@newsbf02.news.aol.com> <49cjnm$p04@bocanews.bocaraton.ibm.com> <49h73m$lrp@natasha.rmii.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!howland.reston.ans.net!agate!agate!Matt
From: kanze@gabi-soft.fr (J. Kanze)
Newsgroups: comp.std.c++
Subject: Re: Standard C++ Macro
Date: 01 Dec 1995 19:16:11 GMT
Organization: GABI Software, Sarl.
Approved: Matt@Austern
Message-ID: <49ml6e$bbg@gabi.gabi-soft.fr>
References: <4998dt$j01@newsbf02.news.aol.com> <49cjnm$p04@bocanews.bocaraton.ibm.com> <49h73m$lrp@natasha.rmii.com>
NNTP-Posting-Host: austern.hip.berkeley.edu