From owner-freebsd-current@FreeBSD.ORG Thu May 26 05:26:24 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B08EC16A41C for ; Thu, 26 May 2005 05:26:24 +0000 (GMT) (envelope-from phk@critter.freebsd.dk) Received: from pasmtp.tele.dk (pasmtp.tele.dk [193.162.159.95]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5ECAF43D1F for ; Thu, 26 May 2005 05:26:24 +0000 (GMT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (0x535c0e2a.sgnxx1.adsl-dhcp.tele.dk [83.92.14.42]) by pasmtp.tele.dk (Postfix) with ESMTP id D7A821EC307 for ; Thu, 26 May 2005 07:26:22 +0200 (CEST) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.13.3/8.13.3) with ESMTP id j4Q5QD9b003632; Thu, 26 May 2005 07:26:13 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: Craig Rodrigues From: "Poul-Henning Kamp" In-Reply-To: Your message of "Thu, 26 May 2005 00:48:24 EDT." <20050526044824.GA81201@crodrigues.org> Date: Thu, 26 May 2005 07:26:13 +0200 Message-ID: <3631.1117085173@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Cc: freebsd-current@freebsd.org Subject: Re: [GCC 4.0 PATCH] devfs_vnops.c X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 May 2005 05:26:24 -0000 In message <20050526044824.GA81201@crodrigues.org>, Craig Rodrigues writes: >"If, within a translation unit, the same identifier appears with both >internal and external linkage, the behavior is undefined." > >So, if you have: > >extern struct foo bar; >static struct foo bar = { ..... }; Well, the reason is it like that is that you cannot forward declare a static (at least in the -current GCC) static struct foo bar; [...] static struct foo bare = { ... }; This might be a bug in C. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.