This is the mail archive of the
mailing list for the GDB project.
Re: MinGW compilation warnings in libiberty's xstrndup.c
- From: DJ Delorie <dj at redhat dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: eliz at gnu dot org, gcc-patches at gcc dot gnu dot org, gdb-patches at sourceware dot org, richard dot guenther at gmail dot com, thomas at codesourcery dot com
- Date: Fri, 19 May 2017 20:38:19 -0400
- Subject: Re: MinGW compilation warnings in libiberty's xstrndup.c
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=dj at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 531CC83F38
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 531CC83F38
Pedro Alves <email@example.com> writes:
> Ah, yeah. AFAICS, all the declaration checks in libiberty.h are
> HAVE_DECL checks. This suggests to me that this declaration guard
> should be HAVE_DECL too .
Except the ones in the $funcs list, which includes strnlen. I think in
the old days, we didn't put in declarations at all... until "char *"
became a different size than "int" and we started needing them.
So some functions in libiberty are HAVE_DECL and others are still HAVE.
Ah, found it, this commit is incomplete:
It changes gcc's configure but nobody else's (and now we have an answer
to the three-year-old question "why don't we have a more liberal commit
policy?" ;) which breaks both libiberty and libgfortran.
> BTW, I once proposed a new libiberty.m4 file that all libiberty
> clients would source so that these checks are all centralized.
I have no philosophical problem with that type of change, but I have the
usual fear of touching anything in libiberty that's been around this
(this bug being a prime example of how subtle an incorrect change can be)
(and honestly, my upstream attention is elsewhere these days)