Path: utzoo!mnetor!uunet!husc6!hao!oddjob!gargoyle!ihnp4!homxb!mtuxo!rolls!doug!tim
From: tim@doug.UUCP (Tim J Ihde)
Newsgroups: comp.lang.c
Subject: Re: Making re-#includes harmless--a simple solution?
Message-ID: <385@doug.UUCP>
Date: 10 Dec 87 13:54:58 GMT
References: <2000@bloom-beacon.MIT.EDU>
Organization: AT&T ISL - Somerset, NJ
Lines: 16
Summary: latest cpp fixes this

In article <2000@bloom-beacon.MIT.EDU>, newman@athena.mit.edu (Ron Newman) writes:
> Why not change the semantics of "#include" to be:  "if, while
> processing the current .c source file, I have already included this
> file once, then don't include it again"?

I don't know if this is in the ANSI definition of include or not, but this
is exactly how the latest version of cpp on System V works.  It simply
remembers each include file that it has read and will ignore it if the same
file shows up again.  This is definatly the way to go.

		tim
-- 
Tim J. Ihde					ihnp4!ctsmain!doug!tim
(201) 535-9897

Ok, we can all agree that this is my fault.