Path: utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!uflorida!gatech!ulysses!gsf From: gsf@ulysses.homer.nj.att.com (Glenn Fowler[eww]) Newsgroups: comp.lang.c++ Subject: Re: Including header files minimally. Summary: alternative requires more work Message-ID: <10873@ulysses.homer.nj.att.com> Date: 19 Nov 88 14:56:46 GMT References: <3561@pt.cs.cmu.edu> <7860@nsc.nsc.com> <3614@pt.cs.cmu.edu> Organization: AT&T Bell Laboratories, Murray Hill Lines: 22 In article <3614@pt.cs.cmu.edu>, dld@f.gp.cs.cmu.edu (David Detlefs) writes: > ... > performance. I don't think it is "semantically muddy." To explain it > again: you include a file. If this file contains no #if-like > constructs, it will generate the same code every time it is included, > ... this breaks with the following simple example: x.h: extern int VARIABLE; tst.c: #include "x.h" #define VARIABLE abc #include "x.h" a proper implementation would have to keep a list of all identifiers referenced within a header to determine if a repeated include would produce different results -- the problem is compounded by nested includes -- Glenn Fowler (201)-582-2195 AT&T Bell Laboratories, Murray Hill, NJ uucp: {att,decvax,ucbvax}!ulysses!gsf internet: gsf@ulysses.att.com