Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/sys/sys
"Steven J. Dovich" writes:
> Hubert Feyrer wrote:
> > On Sun, 4 Jan 2004, Matthias Scheler wrote:
> > > Because it is broken by design if a header file doesn't include header
> > > files it requires itself. And because this is a regression. The
> > > application
> >
> > I'm with Matthias on this issue - IMHO every header should pull in all the
> > things it needs.
>
> And that coddles the lazy at the expense of compile time. Consider
> the lexing costs for all the redundant including of required headers
> which have already been included. That can amount to a measurable
> difference in compile time, particularly when extended across the
> entire NetBSD source tree.
>From the GNU cpp(1) info node: "Once-Only Include Files"
-----------------------""""""
The GNU C preprocessor is programmed to notice when a header file
uses this particular construct and handle it efficiently. If a header
file is contained entirely in a `#ifndef' conditional, then it records
that fact. If a subsequent `#include' specifies the same file, and the
macro in the `#ifndef' is already defined, then the file is entirely
skipped, without even reading it.
Home |
Main Index |
Thread Index |
Old Index