From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12184 invoked by alias); 20 May 2017 00:38:22 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 12156 invoked by uid 89); 20 May 2017 00:38:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=unavailable version=3.3.2 spammy=liberal, honestly, elses, Hx-languages-length:1265 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 20 May 2017 00:38:20 +0000 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 531CC83F38; Sat, 20 May 2017 00:38:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 531CC83F38 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@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 531CC83F38 Received: from greed.delorie.com (ovpn-120-43.rdu2.redhat.com [10.10.120.43]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0498660BE6; Sat, 20 May 2017 00:38:20 +0000 (UTC) Received: from greed.delorie.com.redhat.com (localhost [127.0.0.1]) by greed.delorie.com (8.14.7/8.14.7) with ESMTP id v4K0cJuX026170; Fri, 19 May 2017 20:38:19 -0400 From: DJ Delorie To: Pedro Alves Cc: eliz@gnu.org, gcc-patches@gcc.gnu.org, gdb-patches@sourceware.org, richard.guenther@gmail.com, thomas@codesourcery.com Subject: Re: MinGW compilation warnings in libiberty's xstrndup.c In-Reply-To: <5c5a27d9-b52c-7a08-45bb-1db170d8dd25@redhat.com> (message from Pedro Alves on Fri, 19 May 2017 23:56:04 +0100) Date: Sat, 20 May 2017 01:25:00 -0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2017-05/txt/msg01623.txt.bz2 Pedro Alves 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 [1]. 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: https://gcc.gnu.org/ml/gcc-patches/2014-06/msg00784.html 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 long ;-) (this bug being a prime example of how subtle an incorrect change can be) (and honestly, my upstream attention is elsewhere these days)