A solution to the multiple inclusion problem

Doug Gwyn gwyn at smoke.BRL.MIL
Sat Oct 28 03:53:23 AEST 1989


In article <1989Oct25.164145.29980 at utzoo.uucp> henry at utzoo.uucp (Henry Spencer) writes:
-Can you elaborate on this, Doug?  Seems to me like what he was proposing --
-have compiler recognize files bracketed with `#ifndef FOO_H' and remember
-the bracketing -- comes under the "as if" rule.  Re-including such a file
-with FOO_H defined cannot possibly have any effect except to slow down
-the compilation.

I received some private correspondence on this also, and apparently I
didn't grasp the actual meat of the proposal.

I suppose if further #undef/#define of the identifier were properly
tracked, it would work.



More information about the Comp.lang.c mailing list