Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/sys/sys
Dave Sainty wrote:
> "Steven J. Dovich" writes:
> > 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.
I guess I knew that. But it isn't exactly portable behavior, now
is it? The fact that GCC tries to detect a sub-optimal coding
practice does not make it suddenly palatable. Is it better
engineering to use portable constructs and behavior, or to further
extend ones dependence on a particular implementation of otherwise
standard technology, ie. should we add a few more pounds to the 5
pound sack of GNUisms we are already carrying.
/sjd
Home |
Main Index |
Thread Index |
Old Index