Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Gg5vL-0007Hj-EG for mharc-grub-devel@gnu.org; Fri, 03 Nov 2006 15:45:59 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Gg5vJ-0007HF-LF for grub-devel@gnu.org; Fri, 03 Nov 2006 15:45:57 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Gg5vI-0007Gl-2x for grub-devel@gnu.org; Fri, 03 Nov 2006 15:45:57 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Gg5vH-0007Ga-Pr for grub-devel@gnu.org; Fri, 03 Nov 2006 15:45:55 -0500 Received: from [66.111.4.25] (helo=out1.smtp.messagingengine.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Gg5vH-0003Ht-Md for grub-devel@gnu.org; Fri, 03 Nov 2006 15:45:55 -0500 Received: from db2.internal (db2.internal [10.202.2.12]) by frontend1.messagingengine.com (Postfix) with ESMTP id 2E988DC04E9 for ; Fri, 3 Nov 2006 15:45:54 -0500 (EST) Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by db2.internal (MEProxy); Fri, 03 Nov 2006 15:45:56 -0500 X-Sasl-enc: KEw4okyMRvHQrqJU24AV6aViyuyylGuRqwBHaaBrQmwJ 1162586755 Received: from basalt.austin.ibm.com (bi01p1.co.us.ibm.com [32.97.110.142]) by mail.messagingengine.com (Postfix) with ESMTP id B8F711A0B5 for ; Fri, 3 Nov 2006 15:45:55 -0500 (EST) From: Hollis Blanchard To: The development of GRUB 2 In-Reply-To: <87ejsnxrh7.fsf@night.trouble.net> References: <1162344225.8547.81.camel@basalt.austin.ibm.com> <87ejsnxrh7.fsf@night.trouble.net> Content-Type: text/plain Date: Fri, 03 Nov 2006 14:45:52 -0600 Message-Id: <1162586752.14609.17.camel@basalt.austin.ibm.com> Mime-Version: 1.0 X-Mailer: Evolution 2.6.3 (2.6.3-1.fc5.5) Content-Transfer-Encoding: 7bit Subject: Re: __unused X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Nov 2006 20:45:58 -0000 On Wed, 2006-11-01 at 13:48 +0100, Johan Rydberg wrote: > Hollis Blanchard writes: > > > --- grub2-cvs.orig/include/grub/types.h 2006-10-31 19:06:47.000000000 -0600 > > +++ grub2-cvs/include/grub/types.h 2006-10-31 19:06:58.000000000 -0600 > > @@ -23,6 +23,8 @@ > > #include > > #include > > > > +#define __unused __attribute__ ((unused)) > > + > > First when I saw this it made me wanna comment on it, and tell you > that defines should all be in uppercase. But then I poked through the > code, and saw the usage of it, and it looked quite nice, with the > exception of the __-prefix. There are a lot of "common" words that > are keywords in C; inline, const and auto for example. Maybe we > should make "unused" a reserved keyword in GRUB? That would allow > us to write code like; I left it as "__unused" for now, to match Linux's usage. (We can change it later if needed.) > int > grub_foo (int x, unused int foo) > { > ... > } I believe gcc attributes can't be used as naturally as this; it would have to be "int unused foo" or "int unused *foo" (from memory). -Hollis