Hi Aaron,

On Wed, Aug 27, 2025 at 06:51:36PM -0400, Aaron Merey wrote:
> On Tue, Aug 26, 2025 at 6:46 PM Frank Ch. Eigler <f...@redhat.com> wrote:
> > > RFC: Is the option name --ar-member clear? Do we also want a variant
> > > (--all-ar-members) that checks whether all members match? Do we want
> > > this to work recursively? Should it print the member names that match
> > > instead of the archive file (is that useful?).
> >
> > Suggest "--any-ar-member" to clarify the name, and I wouldn't bother
> > with the other things.
> 
> I second this.

OK. Lets go with that name then.

> Also I noticed the following gcc error when building with the patch applied:
> 
> ‘__builtin___sprintf_chk’ argument 5 overlaps destination object
> ‘current_path’ [-Werror=restrict]
> [...]
> elfclassify.c: In function ‘check_ar_members’:
> elfclassify.c:47:14: note: destination object referenced by
> ‘restrict’-qualified argument 1 was declared here
>    47 | static char *current_path;
> 
> gcc thinks one of the arguments to sprintf (ar_path) is an alias of
> the destination string (current_path). It's a false positive since
> current_path is reassigned before the sprintf call but the code can be
> adjusted to avoid this error.

That is odd. Which gcc version is this with and which configure
options?  Locally (GCC 15.2.1) seems fine. It clearly is a false
positive indeed. I'll try to work around it by using some local
temporary.

Thanks,

Mark

Reply via email to