Xref: utzoo comp.lang.c:23200 comp.lang.c++:5193 gnu.g++:468 Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!ucsd!swrinde!cs.utexas.edu!uunet!xyzzy!meissner From: meissner@dg-rtp.dg.com (Michael Meissner) Newsgroups: comp.lang.c,comp.lang.c++,gnu.g++ Subject: Re: A solution to the multiple inclusion problem Message-ID: Date: 24 Oct 89 14:05:03 GMT References: <14240@well.UUCP> <1989Oct23.191634.6345@cs.rochester.edu> <1659@atanasoff.cs.iastate.edu> Sender: usenet@xyzzy.UUCP Distribution: comp Organization: Data General (Languages @ Research Triangle Park, NC.) Lines: 19 In-reply-to: hascall@atanasoff.cs.iastate.edu's message of 24 Oct 89 00:24:04 GMT In article <1659@atanasoff.cs.iastate.edu> hascall@atanasoff.cs.iastate.edu (John Hascall) writes: > Since the impending ANSI standard requires that including a file more > than once have exactly the same effect as including it once...why can't > a compiler just ignore #includes for files it has already #included??? > (at least for the "standard" includes) > > Any comments from the ANSI mavens? Only the include files specified by standard (stdio.h, string.h, etc.) are required to work when included multiple times (ie, there must be some sort of guard around parts that can not be redeclared, like typedefs and structures). No such requirement is mandated for any other include file. -- Michael Meissner, Data General. If compiles where much Uucp: ...!mcnc!rti!xyzzy!meissner faster, when would we Internet: meissner@dg-rtp.DG.COM have time for netnews?