"E. Robert Tisdale" <> writes:
> Thomas Matthews wrote:
>
> > The file opening time may be reduced by using:
> > #ifndef FOO_H_INCLUDED
> > #include "foo.h"
> > #endif
> > Finding and opening a file is one of the major items
> > for compilation times. Also, in Mark's version, the
> > compiler must scan all the code looking for the
> > #endif, which takes time.
>
> No!
>
> The C preprocessor remembers the names of *idempotent* header files
> and will *not* attempt to find, open or read them a second time.
> Your suggestion is out-of-date and no longer necessary or useful.
No, some implementations of the C preprocessor do this. I have no
idea how many, but it's unwise to assume that they all do. (Not that
it matters, since there's no real functional difference.)
--
Keith Thompson (The_Other_Keith)
kst- <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://www.sdsc.edu/~kst>
Schroedinger does Shakespeare: "To be *and* not to be"