Date: Thu, 16 Jun 2011 19:24:27 +0800 (CST) From: Tai-hwa Liang <avatar@mmlab.cse.yzu.edu.tw> To: Bruce Evans <brde@optusnet.com.au> Cc: Tai-hwa Liang <avatar@freebsd.org>, svn-src-head@freebsd.org, svn-src-all@freebsd.org, Stefan Farfeleder <stefanf@freebsd.org>, src-committers@freebsd.org Subject: Re: svn commit: r223138 - head/sys/ufs/ffs Message-ID: <1106161923211.44181@www.mmlab.cse.yzu.edu.tw> In-Reply-To: <20110616175314.R935@besplex.bde.org> References: <201106160526.p5G5Q3RX013915@svn.freebsd.org> <20110616065310.GA2542@mole.fafoe.narf.at> <20110616175314.R935@besplex.bde.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 16 Jun 2011, Bruce Evans wrote: > 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. Does that mean we have to #include <sys/vnode.h> in userland makefs/ffs/ffs_bswap.c?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1106161923211.44181>