From owner-freebsd-hackers Wed Jul 5 11:55:26 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 9A5CA37C33F for ; Wed, 5 Jul 2000 11:55:20 -0700 (PDT) (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 MAA17133; Wed, 5 Jul 2000 12:55:18 -0600 (MDT) (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 MAA42163; Wed, 5 Jul 2000 12:54:58 -0600 (MDT) Message-Id: <200007051854.MAA42163@harmony.village.org> To: David Malone Subject: Re: Global variables defined several times. Cc: Poul-Henning Kamp , freebsd-hackers@FreeBSD.ORG In-reply-to: Your message of "Mon, 03 Jul 2000 22:22:30 BST." <200007032222.aa41540@salmon.maths.tcd.ie> References: <200007032222.aa41540@salmon.maths.tcd.ie> Date: Wed, 05 Jul 2000 12:54:58 -0600 From: Warner Losh Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message <200007032222.aa41540@salmon.maths.tcd.ie> David Malone writes: : I can't find my second edition at the moment. This behavior is : commented on in the C FAQ as something the ANSI standard describes : as a common extension. (http://www.eskimo.com/~scs/C-faq/q1.7.html) : It also seems to suggest it is mostly a Unix thing. VMS's DEC CC does the same thing as our tool chain. At least on the VMS 4.4 system I used in college. It got lots of other things "different" than the unix compilers we were using (pcc derived things for sun3 and sun4), but this it did the same. C++ requires exactly one definition, but can have many declarations (eg only one int foo, but many extern int foo). Actually, conforming C++ compilers may require exactly one definition. This is listed in the appendix of one of the Stroustup books as being a departure from plain old C. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message