Subject: Re: problems with arpa/inet.h
To: None <current-users@NetBSD.ORG>
From: Olaf Seibert <rhialto@polder.ubc.kun.nl>
List: current-users
Date: 06/10/1998 16:29:00
In <Pine.NEB.3.96.980609130748.23174g-100000@beech.pd.tgi.plexus.com> Scott Reynolds <scottr@Plexus.COM> writes:

>On Tue, 9 Jun 1998 rhialto@polder.ubc.kun.nl wrote:
>
>> In <Pine.NEB.3.95.980609110228.206W-100000@apb.iafrica.com> Alan Barrett 
>> <apb@iafrica.com> writes:
>> 
>> >Mike Long <mikel@shore.net> said:
>> >> Multiple inclusion protection does not keep cpp from reading the whole
>> >> header each time it is #included.
>> >
>> >This is just a SMOP.  Nothing prevents the compiler from noticing when a
>> >file consists entirely of comments, blank lines, and [...]
>> 
>> And in fact, cccp (gnu's cpp) already does this.
>
>The main problem with this reasoning is that cpp only knows this for a
>single invocation. I don't know about you, but compiling one source file

If you want precompiled headers, you can't do any better than the SAS/C
compiler for the Amiga (AmigaOS). It kept them in memory, for access in
about zero time.

>and that may have one or two files included multiple times is simply _not_
>a concern.  The real issue is having headers pull in other headers (which
>may pull in other headers)... think `how much output from cpp is cc1 going
>to have to chew on?'  Now, multiply this processing time by N source
>files.

This is no argument. If a header A should be included before header B,
because B uses something from A, then it doesn't matter for the amount
of preprocessed output if A is included by B, or by the main program.

>--scott

-Olaf.
--
___ Olaf 'Rhialto' Seibert                D787B44DFC896063 4CBB95A5BD1DAA96 
\X/ * You are not expected to understand this.    rhialto@polder.ubc.kun.nl