From owner-cvs-src@FreeBSD.ORG Thu Jan 18 05:28:26 2007 Return-Path: X-Original-To: cvs-src@freebsd.org Delivered-To: cvs-src@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 164DE16A4A7; Thu, 18 Jan 2007 05:28:26 +0000 (UTC) (envelope-from rodrigc@crodrigues.org) Received: from alnrmhc11.comcast.net (alnrmhc11.comcast.net [204.127.225.91]) by mx1.freebsd.org (Postfix) with ESMTP id C456C13C43E; Thu, 18 Jan 2007 05:28:25 +0000 (UTC) (envelope-from rodrigc@crodrigues.org) Received: from c-66-31-35-94.hsd1.ma.comcast.net ([66.31.35.94]) by comcast.net (alnrmhc11) with ESMTP id <20070118052824b11004buo4e>; Thu, 18 Jan 2007 05:28:24 +0000 Received: from c-66-31-35-94.hsd1.ma.comcast.net (localhost.crodrigues.org [127.0.0.1]) by c-66-31-35-94.hsd1.ma.comcast.net (8.13.8/8.13.8) with ESMTP id l0I5SMls003638; Thu, 18 Jan 2007 00:28:22 -0500 (EST) (envelope-from rodrigc@c-66-31-35-94.hsd1.ma.comcast.net) Received: (from rodrigc@localhost) by c-66-31-35-94.hsd1.ma.comcast.net (8.13.8/8.13.8/Submit) id l0I5SLDI003637; Thu, 18 Jan 2007 00:28:21 -0500 (EST) (envelope-from rodrigc) Date: Thu, 18 Jan 2007 00:28:16 -0500 From: Craig Rodrigues To: Alexander Kabaev Message-ID: <20070118052816.GA3582@crodrigues.org> References: <200701180200.l0I2049r024678@repoman.freebsd.org> <20070117214345.27d1db56@kan.dnsalias.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070117214345.27d1db56@kan.dnsalias.net> User-Agent: Mutt/1.4.2.1i Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/amd64/include md_var.h X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jan 2007 05:28:26 -0000 On Wed, Jan 17, 2007 at 09:43:45PM -0500, Alexander Kabaev wrote: > Back this out please. I do not see how this change can possibly be > correct. For this testcase: void main(void) { extern struct foo array_foo[]; return 0; } GCC3 will compile this testcase without error, but GCC4 will complain with: error: "array type has incomplete element type". Two ways to eliminate this GCC4 compilation error: (1) Change testcase to: int main(void) { extern struct foo *array_foo; return 0; } (2) Make struct definition visible earlier on: #include "foo.h" /* where foo.h contains: struct foo { int a; }; */ int main(void) { extern struct foo array_foo[]; return 0; } For md_var.h, I chose approach (1). Do recommend approach (2), or some other fix? -- Craig Rodrigues rodrigc@crodrigues.org