This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 1/2] Mark internal argz functions with attribute_hidden [BZ #18822]
- From: Joseph Myers <joseph at codesourcery dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Fri, 18 Aug 2017 15:50:38 +0000
- Subject: Re: [PATCH 1/2] Mark internal argz functions with attribute_hidden [BZ #18822]
- Authentication-results: sourceware.org; auth=none
- References: <20170818130141.GA4463@gmail.com> <alpine.DEB.2.20.1708181358140.17497@digraph.polyomino.org.uk> <CAMe9rOrQL_o2kfj4PH=5tmiHUdjSX5WNGLksXQ08KR9-CvEp6g@mail.gmail.com>
On Fri, 18 Aug 2017, H.J. Lu wrote:
> > In this case, the problem presumably is that the internal declarations are
> > in the installed argz.h header. So move them from the installed header to
> > the include/ one. At that point, using typeof *does* make sense to copy
> > the type from the public function, e.g.
> >
> > extern __typeof (argz_add) __argz_add __THROW attribute_hidden;
> >
> > (argz.h is shared with gnulib, but in gnulib it doesn't have those
> > internal declarations anyway. So moving them to the include/ header helps
> > bring the public one closer to the gnulib version.)
> >
>
> Done.
>
> Here is the updated patch. OK for master?
__argz_replace was not previously __THROW, and neither is argz_replace.
If you have done an analysis that establishes that use of __THROW is safe
there, it should be added to argz_replace rather than just to the internal
declaration.
--
Joseph S. Myers
joseph@codesourcery.com