public inbox for libc-ports@sourceware.org
 help / color / mirror / Atom feed
From: "Carlos O'Donell" <carlos@systemhalted.org>
To: Richard Henderson <rth@twiddle.net>
Cc: Thomas Schwinge <thomas@codesourcery.com>,
	libc-alpha@sourceware.org, 	libc-ports@sourceware.org
Subject: Re: Usage of __attribute__used__ in (system) headers?
Date: Mon, 18 Feb 2013 19:41:00 -0000	[thread overview]
Message-ID: <CAE2sS1j8PQ=+LNCihphwr-RbxfNkRtB3xfOz9DmaQhp5x7kdOQ@mail.gmail.com> (raw)
In-Reply-To: <51227F2E.5060103@twiddle.net>

On Mon, Feb 18, 2013 at 2:21 PM, Richard Henderson <rth@twiddle.net> wrote:
> On 02/18/2013 11:00 AM, Carlos O'Donell wrote:
>>> >  static union { unsigned char __c[4]; float __d; } __nan_union
>>> > -    __attribute_used__ = { __nan_bytes };
>>> > +  = { __nan_bytes };
>>> >  # define NAN   (__nan_union.__d)
>>> >
>>> >  #endif /* GCC.  */
>> I disagree, it's useful to mark the non-GCC version with
>> an __attribute_used__ such that in the future we might
>> use another compiler without problems.
>
> The annotation should not be attribute used at all, but rather unused.
>
> Used says that the object is referenced in some non-visible way by
> assembly, and thus cannot be elided.  Unused says that we understand the
> variable may not be referenced, and don't warn; but do, in particular,
> remove it if it is unused.

Yes, thanks for catching that, honestly I forget that it's a "possibly
unused" in that case.

glibc doesn't have an __attribute_unused__.

I'd be happy to review a patch that adds it and fixes up the 8
references to the bare attribute.

Cheers,
Carlos.

  reply	other threads:[~2013-02-18 19:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87r4khnbqm.fsf@kepler.schwinge.homeip.net>
2013-02-18 19:00 ` Carlos O'Donell
2013-02-18 19:21   ` Richard Henderson
2013-02-18 19:41     ` Carlos O'Donell [this message]
2013-02-20 16:06       ` Thomas Schwinge
2013-02-20 16:25         ` Carlos O'Donell
2013-02-20 17:56           ` Thomas Schwinge
2013-02-20 18:02             ` Carlos O'Donell

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='CAE2sS1j8PQ=+LNCihphwr-RbxfNkRtB3xfOz9DmaQhp5x7kdOQ@mail.gmail.com' \
    --to=carlos@systemhalted.org \
    --cc=libc-alpha@sourceware.org \
    --cc=libc-ports@sourceware.org \
    --cc=rth@twiddle.net \
    --cc=thomas@codesourcery.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).