This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]