From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1GgCQn-0001t0-Il for mharc-grub-devel@gnu.org; Fri, 03 Nov 2006 22:42:53 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GgCQl-0001sg-4E for grub-devel@gnu.org; Fri, 03 Nov 2006 22:42:51 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GgCQj-0001sI-8N for grub-devel@gnu.org; Fri, 03 Nov 2006 22:42:50 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GgCQj-0001sF-5o for grub-devel@gnu.org; Fri, 03 Nov 2006 22:42:49 -0500 Received: from [195.54.107.73] (helo=mxfep02.bredband.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GgCQi-0005Ed-Bh for grub-devel@gnu.org; Fri, 03 Nov 2006 22:42:48 -0500 Received: from ironport2.bredband.com ([195.54.107.84] [195.54.107.84]) by mxfep02.bredband.com with ESMTP id <20061104034247.OAZ9734.mxfep02.bredband.com@ironport2.bredband.com> for ; Sat, 4 Nov 2006 04:42:47 +0100 Received: from c-e8df71d5.029-19-73746f13.cust.bredbandsbolaget.se (HELO localhost.localdomain) ([213.113.223.232]) by ironport2.bredband.com with ESMTP; 04 Nov 2006 04:42:47 +0100 From: Johan Rydberg To: The development of GRUB 2 References: <1162344225.8547.81.camel@basalt.austin.ibm.com> <87ejsnxrh7.fsf@night.trouble.net> <1162586752.14609.17.camel@basalt.austin.ibm.com> Date: Sat, 04 Nov 2006 04:44:17 +0100 In-Reply-To: <1162586752.14609.17.camel@basalt.austin.ibm.com> (Hollis Blanchard's message of "Fri, 03 Nov 2006 14:45:52 -0600") Message-ID: <87velvx4dq.fsf@night.trouble.net> User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" 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: Sat, 04 Nov 2006 03:42:51 -0000 --=-=-= Hollis Blanchard writes: >> 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). jrydberg@fauna:~/tmp/t5 $ gcc -Dunused= -Wall -Wunused-parameter -O2 -c t1.c t1.c: In function 'foo': t1.c:6: warning: unused parameter 'x' t1.c:6: warning: unused parameter 'baz' jrydberg@fauna:~/tmp/t5 $ gcc -Wall -Wunused-parameter -O2 -c t1.c t1.c: In function 'foo': t1.c:6: warning: unused parameter 'x' jrydberg@fauna:~/tmp/t5 $ cat t1.c #ifndef unused # define unused __attribute__((unused)) #endif int foo (int x, unused int baz) { return 0; } ~j --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (GNU/Linux) iD8DBQBFTAyU3CqIy3K3X2ERAvu3AKDWOJoqiV+07yXgRRW/lEL6/eUm/QCeI8iH kQK6I6Uq+n03hwrvNRocZFs= =Dqpr -----END PGP SIGNATURE----- --=-=-=--