From owner-freebsd-hackers Wed Jan 5 10:37:50 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from rover.village.org (rover.village.org [204.144.255.49]) by hub.freebsd.org (Postfix) with ESMTP id CD9751544D for ; Wed, 5 Jan 2000 10:37:44 -0800 (PST) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.9.3/8.9.3) with ESMTP id LAA07081; Wed, 5 Jan 2000 11:37:40 -0700 (MST) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (localhost.village.org [127.0.0.1]) by harmony.village.org (8.9.3/8.8.3) with ESMTP id LAA68897; Wed, 5 Jan 2000 11:37:40 -0700 (MST) Message-Id: <200001051837.LAA68897@harmony.village.org> To: nate@mt.sri.com (Nate Williams) Subject: Re: [OFFTOPIC] alt. C compiler Cc: "Ronald F. Guilmette" , Martin Cracauer , mauzi@poli.hu, hackers@FreeBSD.ORG In-reply-to: Your message of "Wed, 05 Jan 2000 11:16:28 MST." <200001051816.LAA20023@mt.sri.com> References: <200001051816.LAA20023@mt.sri.com> <20000105100716.A63545@cons.org> <98339.947095734@monkeys.com> Date: Wed, 05 Jan 2000 11:37:40 -0700 From: Warner Losh Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message <200001051816.LAA20023@mt.sri.com> Nate Williams writes: : > [3] The ANSI C standard, at least, contains the requirement that each : > individual system include file specified by that standard should : > be usable all by itself, without the programmer being required to : > explicitly include any OTHER system include files, prior to the one : > he/she is actually interested in using. : : Can you quote me chapter and verse for this? I don't believe this to be : true, and in truth, I believe this is completely wrong. I don't think he can. The only requirements that it has are that some header files not pull other header files in to define certain things. NULL can be defined in a number of different places, for example, but if you include stdlib.h or stddef.h for it, you don't get stdio.h. This is explained in more detail in section 7.1.1.4 of the August 3, 1998 committee draft: 7.1.1 Library 7.1.2 ... [#2] The standard headers are ... [#4] Standard headers may be included in any order; each may be included more than once in a given scope, with no effect different from being included only once, except that the effect of including depends on the definition of NDEBUG (see 7.2). [...] However, if an identifier is declared or defined in more than one header, the second and subsequent associated headers may be included after the initial reference to the identifier.[...] ... Notice that these are for the *STANDARD* header files not the *SYSTEM* header files. This is much different than having sys/mublefoo.h depending on sys/types.h being included first. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message