Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!lll-winken!uunet!aussie!rex From: rex@aussie.UUCP (Rex Jaeschke) Newsgroups: comp.std.c Subject: Re: (requires ?) Message-ID: <4.UUL1.3#5077@aussie.UUCP> Date: 9 Apr 89 18:01:42 GMT References: <10447@bloom-beacon.MIT.EDU> Organization: Journal of C Language Translation Lines: 32 > This strikes me as a bug. I believe it is in an ANSI-conformant implementation. > but does it ever say > you have to #include one before you can #include another? No. Every standard header must be self-sufficient (there may be notable exceptions documented there) - it can't really #include another standard header itself since NULL, for example, is only defined when one of the 5 or 6 standard headers it is defined in, is included by the programmer. ANSI places no requirement you include stdio before using stdarg and requiring you to do so MUST be non-standard. A std header could only include another std header as long as it could undo every name brought in with it after it used those it needed, and that is generally impossible, certainly for structure templates and typedefs since there is no way to forget about them once declared. A similar situation occurs with MSF V5.1 in assert.h. assert calls fprintf which requires stderr, a macro only defined in stdio. (Actually, MSf's assert needs quite a bit of surgery to be conformant.) Rex ---------------------------------------------------------------------------- Rex Jaeschke | C Users Journal | Journal of C Language Translation (703) 860-0091 | DEC PROFESSIONAL |1810 Michael Faraday Drive, Suite 101 uunet!aussie!rex | Programmers Journal | Reston, Virginia 22090, USA ----------------------------------------------------------------------------