From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS22989 209.51.188.0/24 X-Spam-Status: No, score=-4.0 required=3.0 tests=AWL,BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 1B9111F5A2 for ; Sat, 8 Feb 2020 16:40:33 +0000 (UTC) Received: from localhost ([::1]:43158 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j0T9k-0007SL-7U for normalperson@yhbt.net; Sat, 08 Feb 2020 11:40:32 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50133) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j0T9g-0007Qr-5L for bug-gnulib@gnu.org; Sat, 08 Feb 2020 11:40:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j0T9f-0004th-6Y for bug-gnulib@gnu.org; Sat, 08 Feb 2020 11:40:28 -0500 Received: from mo6-p00-ob.smtp.rzone.de ([2a01:238:20a:202:5300::6]:14356) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j0T9e-0004tQ-Gn for bug-gnulib@gnu.org; Sat, 08 Feb 2020 11:40:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1581180023; s=strato-dkim-0002; d=clisp.org; h=Message-ID:Date:Subject:To:From:X-RZG-CLASS-ID:X-RZG-AUTH:From: Subject:Sender; bh=+Wh7RBmh5bta+q2XEycyFmermf64wk7q9NB68pKqwM0=; b=JdPL4AahUkNjAFOTch7x0+ShGcxpyxqvKKKFAVrtsGTZLp+OinAGVoxYSiCgiVR5vd uQ4EKe46FjmLfMxQNCifw/KnFvwzDSgXh8yWYFKrDcACqZpA0mhjS7lDnP6xxEYrx2ek 7HD9T0jvSVtzevEaOc0HdezKz9gD6Zpcy3sBkdT27sKKM20vMcv6MhmN9gXEpKOi/5TN Gc3hTbWi68x+WLBb4IU6SqM6gumhjZwsFRbXL1G5cU6oga2jetpPVZWzIx3/f+mWf4x0 muuC4nPjJQIpK3amz14LVw90FQSjuClTiLblU+s1T75E8OtvtKBvf8bG2uLI7sbO0hMu BuhQ== X-RZG-AUTH: ":Ln4Re0+Ic/6oZXR1YgKryK8brlshOcZlIWs+iCP5vnk6shH+AHjwLuWOH6fzxfs=" X-RZG-CLASS-ID: mo00 Received: from bruno.haible.de by smtp.strato.de (RZmta 46.1.12 DYNA|AUTH) with ESMTPSA id g00701w18GeMg6B (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (curve X9_62_prime256v1 with 256 ECDH bits, eq. 3072 bits RSA)) (Client did not present a certificate); Sat, 8 Feb 2020 17:40:22 +0100 (CET) From: Bruno Haible To: bug-gnulib@gnu.org Subject: Fix compilation errors in a testdir created with --with-c++-tests Date: Sat, 08 Feb 2020 17:40:22 +0100 Message-ID: <10908736.PXbBvi3vnf@omega> User-Agent: KMail/5.1.3 (Linux/4.4.0-171-generic; KDE/5.18.0; x86_64; ; ) MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a01:238:20a:202:5300::6 X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" In a testdir created through ./gnulib-tool --create-testdir --dir=... --single-configure --with-c++-tests lchmod fchmodat I'm getting compilation errors, such as: In file included from test-string-c++.cc:22: ../gllib/string.h:707: error: type of 'memrchr' is unknown ../gllib/string.h:707: error: invalid type in declaration before ';' token ../gllib/string.h:707: error: 'int memrchr' redeclared as different kind of symbol /usr/include/string.h:114: error: previous declaration of 'const void* memrchr(const void*, int, size_t)' This patch fixes it, unfortunately at the cost of disabling useful warnings. 2020-02-08 Bruno Haible Fix compilation errors in a testdir created with --with-c++-tests. * lib/c++defs.h (_GL_CXXALIASWARN1_2): Do not use __typeof__ (func), since it does not work any more with g++ >= 4.4. diff --git a/lib/c++defs.h b/lib/c++defs.h index 5d5da71..402cae4 100644 --- a/lib/c++defs.h +++ b/lib/c++defs.h @@ -301,9 +301,6 @@ _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ "The symbol ::" #func " refers to the system function. " \ "Use " #namespace "::" #func " instead.") -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - extern __typeof__ (func) func # else # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ _GL_EXTERN_C int _gl_cxxalias_dummy