From owner-svn-src-head@FreeBSD.ORG Sun Jul 25 19:08:33 2010 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 C9A531065677; Sun, 25 Jul 2010 19:08:33 +0000 (UTC) (envelope-from dimitry@andric.com) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id 8FD9D8FC08; Sun, 25 Jul 2010 19:08:33 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:7c3d:1bf0:778d:8b44] (unknown [IPv6:2001:7b8:3a7:0:7c3d:1bf0:778d:8b44]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 971B75C59; Sun, 25 Jul 2010 21:08:32 +0200 (CEST) Message-ID: <4C4C8BB0.7020701@andric.com> Date: Sun, 25 Jul 2010 21:08:32 +0200 From: Dimitry Andric User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.9pre) Gecko/20100723 Lanikai/3.1.2pre MIME-Version: 1.0 To: Kostik Belousov References: <201007241814.o6OIEY4K099556@svn.freebsd.org> <20100724183732.GA1715@mole.fafoe.narf.at> <20100726013202.G11808@delplex.bde.org> <20100725181255.GB22295@deviant.kiev.zoral.com.ua> In-Reply-To: <20100725181255.GB22295@deviant.kiev.zoral.com.ua> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Stefan Farfeleder , src-committers@freebsd.org, Bruce Evans Subject: Re: svn commit: r210451 - head/sys/sys 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: Sun, 25 Jul 2010 19:08:33 -0000 On 2010-07-25 20:12, Kostik Belousov wrote: > I looked at the C99, and indeed, there is an explicit sentence > "A type specifier of the form enum identifier without an enumerator list > shall only appear after the type it specifies is complete." Later in the same section it even has: 6. A declaration of the form struct-or-union identifier ; specifies a structure or union type and declares the identifier as a tag of that type. 111) with note 111 explicitly saying: "A similar construction with enum does not exist." > I fully agree with Bruce that this is unfortunate, or rather, makes > enum tag declaration completely unuseful. gcc extension greatly simplifies > dealing with the headers pollution. However, if you wanted to call exec_copyin_args(), you would now be forced to remember to hand-include sys/uio.h before this header, or the compiler would not know the enum values themselves. You only gain something when not using that specific function (and thus the enum) at all. Maybe you could move just this function and the enum declaration to another header, but that is probably overkill... :)