Article View: comp.std.c++
Article #3241Re: #ifdef XXXX
From: J. Kanze
Date: Sat, 03 Feb 1996 17:17
Date: Sat, 03 Feb 1996 17:17
36 lines
2011 bytes
2011 bytes
In article <1996Feb1.092058.4745@iiasa.ac.at> marek@iiasa.ac.at (Marek
MAKOWSKI) writes:
> Would not it be sensible to add to the preprocessing a directive
> that would stop processing the current file ? Something like
>
> #ifdef XXXX
> #exit
>
> this would safe processing (sometimes very long) file in the common
> situations:
>
> #ifdef XXXX
> // a (possibly) long header file hear
> #endif /* ifdef XXXX*/
Why bother? The usual procedure is for the compiler to recognize the
pattern the first time it reads the file, and not even open it in
further include declarations.
(I know that g++ does this, but I seem to recall from some earlier
discussion someone at Sun claiming that they had done measurements, and
it wasn't worth the bother. Given that it sometimes takes close to a
second to open a file on one customer's network, I'm rather sceptical of
these results.)
--
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://reality.sgi.com/employees/austern_mti/std-c++/policy.html
]
Technical Details
Message-ID:
<KANZE.96Feb3113609@gabi.gabi-soft.fr>Path:
arc1-ca.pugleaf.net!engnews1.Eng.Sun.COM!taumet!clamageReferences:
<1996Feb1.092058.4745@iiasa.ac.at>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!engnews1.Eng.Sun.COM!taumet!clamage From: kanze@gabi.gabi-soft.fr (J. Kanze) Newsgroups: comp.std.c++ Subject: Re: #ifdef XXXX Date: 3 Feb 1996 17:17:27 GMT Organization: GABI Software, Sarl. Approved: clamage@eng.sun.com (comp.std.c++) Message-ID: <KANZE.96Feb3113609@gabi.gabi-soft.fr> References: <1996Feb1.092058.4745@iiasa.ac.at> NNTP-Posting-Host: taumet.eng.sun.com Content-Type: text X-Nntp-Posting-Host: gabi.gabi-soft.fr In-Reply-To: marek@iiasa.ac.at's message of 01 Feb 96 15:50:32 GMT Content-Length: 1173 Originator: clamage@taumet