This is the mail archive of the
elfutils-devel@sourceware.org
mailing list for the elfutils project.
Re: __attribute__((unused)) on function
- From: Roland McGrath <roland at redhat dot com>
- To: elfutils-devel at lists dot fedorahosted dot org
- Date: Fri, 09 Jan 2009 23:31:41 -0800
- Subject: Re: __attribute__((unused)) on function
It was probably a problem in some earlier gcc version like 4.0 or 4.1. But
that reminds me, all that code is actually useless because it's all stubbed
out in the !USE_TLS case. It seems unlikely at this point we'll ever care
about thread safety in a configuration without __thread support. So we
might as well just rip out all the never-really-there non-TLS threaded stuff.
In fact, we can probably reduce it to:
#ifndef USE_TLS
# define __thread /* empty */
#endif
and switch *_error.c to simply write:
static __thread int libfoo_error;
and the *_errno/__lib*_seterrno functions become 3/1 lines.
Thanks,
Roland