public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
From: Roland McGrath <roland@redhat.com>
To: Andreas Jaeger <aj@suse.de>
Cc: Richard Henderson <rth@redhat.com>,
	Glibc hackers <libc-hacker@sources.redhat.com>
Subject: Re: Aliases ...
Date: Fri, 14 Jan 2005 18:56:00 -0000	[thread overview]
Message-ID: <200501141856.j0EIuEMu016610@magilla.sf.frob.com> (raw)
In-Reply-To: Andreas Jaeger's message of  Friday, 14 January 2005 19:40:56 +0100 <m3is5z4zwn.fsf@gromit.moeb>

> Roland McGrath <roland@redhat.com> writes:
> 
> >> Here's a patch to initialize it - it removes the warning.
> >
> > This really happens with __thread?  The right thing when this issue comes
> > up is to use __attribute__((nocommon)).
> 
> 
> This test case does indeed warn:
> 
>  __thread int errno __attribute__ ((nocommon));
> extern __thread int __libc_errno __attribute__ ((alias ("errno")));
> 
> with:
> test.i:2: warning: ^[$,1rx^[(B__libc_errno^[$,1ry^[(B aliased to undefined symbol ^[$,1rx^[(Berrno^[$,1ry
^[(B> 
> Initialising it to 0 fixes it,

Of course __attribute__ ((nocommon)) isn't meaningful with __thread.
__thread variables are never commons.  The question is why there is a
warning in the first place here.  AFAIK, there is no problem with an
uninitialized __thread variable getting an alias, except in the compiler's
mind.  

  reply	other threads:[~2005-01-14 18:56 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-09 21:00 Aliases Andreas Jaeger
     [not found] ` <20050109232721.GA23478@redhat.com>
2005-01-10  6:11   ` Aliases Andreas Jaeger
2005-01-14  9:09     ` Aliases Andreas Jaeger
2005-01-30 10:36       ` Aliases Andreas Jaeger
2005-01-14  8:54   ` Aliases Andreas Jaeger
2005-01-14 16:41     ` Aliases Roland McGrath
2005-01-14 18:41       ` Aliases Andreas Jaeger
2005-01-14 18:56         ` Roland McGrath [this message]
2005-01-10 17:14 ` Aliases H. J. Lu
2005-01-10 17:27   ` Aliases H. J. Lu
     [not found] <20050114192642.GC19955@redhat.com>
2005-01-14 19:30 ` Aliases Roland McGrath
2005-01-14 20:04   ` Aliases Jakub Jelinek
2005-01-15  7:19     ` Aliases Andreas Jaeger
2005-01-15  9:35       ` Aliases Jakub Jelinek
2005-01-15  9:49         ` Aliases Andreas Jaeger
2005-01-14 20:23   ` Aliases Andreas Schwab

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=200501141856.j0EIuEMu016610@magilla.sf.frob.com \
    --to=roland@redhat.com \
    --cc=aj@suse.de \
    --cc=libc-hacker@sources.redhat.com \
    --cc=rth@redhat.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).