All of lore.kernel.org
 help / color / mirror / Atom feed
From: Colin Watson <cjwatson@ubuntu.com>
To: grub-devel@gnu.org
Subject: Re: Disable -Werror when error attribute generates warnings
Date: Sun, 3 Jan 2010 21:48:53 +0000	[thread overview]
Message-ID: <20100103214852.GY5847@riva.ucam.org> (raw)
In-Reply-To: <4B3F8EA1.7020106@gmail.com>

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]



  parent reply	other threads:[~2010-01-03 21:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-02 12:58 Disable -Werror when error attribute generates warnings Grégoire Sutre
2010-01-02 15:37 ` Colin Watson
2010-01-02 18:05   ` Grégoire Sutre
2010-01-02 18:21   ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-01-03 16:47     ` Robert Millan
2010-01-03 21:48     ` Colin Watson [this message]
2010-01-03 16:46   ` Robert Millan
2010-01-03 21:55     ` Colin Watson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100103214852.GY5847@riva.ucam.org \
    --to=cjwatson@ubuntu.com \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.