From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1NRYJr-0007CO-16 for mharc-grub-devel@gnu.org; Sun, 03 Jan 2010 16:49:03 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NRYJo-0007Bu-D7 for grub-devel@gnu.org; Sun, 03 Jan 2010 16:49:00 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NRYJj-0007BB-Iw for grub-devel@gnu.org; Sun, 03 Jan 2010 16:49:00 -0500 Received: from [199.232.76.173] (port=48042 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NRYJj-0007B8-Ec for grub-devel@gnu.org; Sun, 03 Jan 2010 16:48:55 -0500 Received: from smarthost02.mail.zen.net.uk ([212.23.3.141]:43420) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NRYJj-0008In-0a for grub-devel@gnu.org; Sun, 03 Jan 2010 16:48:55 -0500 Received: from [82.69.40.219] (helo=riva.pelham.vpn.ucam.org) by smarthost02.mail.zen.net.uk with esmtp (Exim 4.63) (envelope-from ) id 1NRYJh-0007F5-JP for grub-devel@gnu.org; Sun, 03 Jan 2010 21:48:53 +0000 Received: from cjwatson by riva.pelham.vpn.ucam.org with local (Exim 3.36 #1 (Debian)) for grub-devel@gnu.org id 1NRYJh-0007Nu-00; Sun, 03 Jan 2010 21:48:53 +0000 Date: Sun, 3 Jan 2010 21:48:53 +0000 From: Colin Watson To: grub-devel@gnu.org Message-ID: <20100103214852.GY5847@riva.ucam.org> References: <4B3F42EC.1010100@labri.fr> <20100102153738.GX5847@riva.ucam.org> <4B3F8EA1.7020106@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4B3F8EA1.7020106@gmail.com> User-Agent: Mutt/1.5.18 (2008-05-17) X-Originating-Smarthost02-IP: [82.69.40.219] X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Subject: Re: Disable -Werror when error attribute generates warnings X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jan 2010 21:49:01 -0000 On Sat, Jan 02, 2010 at 07:21:21PM +0100, Vladimir 'φ-coder/phcoder' Serbinenko wrote: > Colin Watson wrote: > > Instead of this, why not only use the attribute if it's available? I > > couldn't find an entry about it in GCC's human-readable change > > summaries, but support was committed on 2007-09-23 so I think it's > > available from GCC 4.3. > > Why not have configure.ac check specifically if this attribute is > available and use it only if it is? Perhaps it's a style thing; for some reason I've always preferred this approach, even though normally I would advocate doing feature tests at configure time rather than version tests at compile time. My preference may be because __attribute__ is GCC-specific anyway, and there's no guarantee that another compiler would implement the same attribute names in the same way if they happened to use them, so it's better to be quite explicit that this is specific to appropriate versions of GCC. -- Colin Watson [cjwatson@ubuntu.com]