From owner-svn-src-head@FreeBSD.ORG Thu Jun 16 07:58:20 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 88A94106564A; Thu, 16 Jun 2011 07:58:20 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail01.syd.optusnet.com.au (mail01.syd.optusnet.com.au [211.29.132.182]) by mx1.freebsd.org (Postfix) with ESMTP id F05928FC16; Thu, 16 Jun 2011 07:58:19 +0000 (UTC) Received: from c122-106-165-191.carlnfd1.nsw.optusnet.com.au (c122-106-165-191.carlnfd1.nsw.optusnet.com.au [122.106.165.191]) by mail01.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id p5G7wFeh022778 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 16 Jun 2011 17:58:16 +1000 Date: Thu, 16 Jun 2011 17:58:15 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Stefan Farfeleder In-Reply-To: <20110616065310.GA2542@mole.fafoe.narf.at> Message-ID: <20110616175314.R935@besplex.bde.org> References: <201106160526.p5G5Q3RX013915@svn.freebsd.org> <20110616065310.GA2542@mole.fafoe.narf.at> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Tai-hwa Liang , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r223138 - head/sys/ufs/ffs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jun 2011 07:58:20 -0000 On Thu, 16 Jun 2011, Stefan Farfeleder wrote: >> Log: >> Fixing compilation bustage by introducing another forward declaration. >> >> Modified: >> head/sys/ufs/ffs/ffs_extern.h >> >> Modified: head/sys/ufs/ffs/ffs_extern.h >> ============================================================================== >> --- head/sys/ufs/ffs/ffs_extern.h Thu Jun 16 02:27:05 2011 (r223137) >> +++ head/sys/ufs/ffs/ffs_extern.h Thu Jun 16 05:26:03 2011 (r223138) >> @@ -33,6 +33,7 @@ >> #ifndef _UFS_FFS_EXTERN_H >> #define _UFS_FFS_EXTERN_H >> >> +enum vtype; >> struct buf; >> struct cg; >> struct fid; This might unsort the declarations (it isn't clear if the declarations should be sorted on tag name or keyword name). > This is not valid C code. For some reason GCC allows it (with our > compilation flags). This is a bug in gcc-4.2.1. gcc-3.3.3 generates a warning for it even with no compilation flags, while gcc-4.2.1 doesn't generate a warning even with -Wall -std-c99. It takes -pedantic to generate the warning with gcc-4.2.1. TenDRA of course generates an error. It might be a style bug (like typedefing a struct) to use enums for anything. They are impossible to declare opaquely. Bruce