Xref: utzoo comp.lang.c:23286 comp.lang.c++:5223 gnu.g++:477 Newsgroups: comp.lang.c,comp.lang.c++,gnu.g++ Path: utzoo!henry From: henry@utzoo.uucp (Henry Spencer) Subject: Re: A solution to the multiple inclusion problem Message-ID: <1989Oct25.164145.29980@utzoo.uucp> Organization: U of Toronto Zoology References: <14240@well.UUCP> <11396@smoke.BRL.MIL> Date: Wed, 25 Oct 89 16:41:45 GMT In article <11396@smoke.BRL.MIL> gwyn@brl.arpa (Doug Gwyn) writes: >> I propose a solution via compiler optimization. > >Your solution does not at all seem to me to preserve existing semantics. 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. -- A bit of tolerance is worth a | Henry Spencer at U of Toronto Zoology megabyte of flaming. | uunet!attcan!utzoo!henry henry@zoo.toronto.edu