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-Status: No, score=-3.8 required=3.0 tests=AWL,BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,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 891211F4B4 for ; Fri, 15 Jan 2021 09:51:16 +0000 (UTC) Received: from localhost ([::1]:36706 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l0LlD-0007ll-74 for normalperson@yhbt.net; Fri, 15 Jan 2021 04:51:15 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50336) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l0Ll9-0007lJ-7y for bug-gnulib@gnu.org; Fri, 15 Jan 2021 04:51:11 -0500 Received: from mo4-p01-ob.smtp.rzone.de ([85.215.255.52]:25049) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l0Ll5-0000Jv-P3 for bug-gnulib@gnu.org; Fri, 15 Jan 2021 04:51:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1610704264; s=strato-dkim-0002; d=clisp.org; h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:From: Subject:Sender; bh=p+0qSzYYOKJ6AdatmmLL4A3f1PRBANZdJUzloG8G2lM=; b=eqvGwwY2jPDIAzOLS/HfYqpMTi9HxuBQd7pY5by5S5sSvwFbO9DGeJb6yLSBSOZ4kO XSurT1QvMekowOBoepA/W9GtvEFNrRZrUyWzliMWJ9by2gl9pdwoxFRNrFojtjB17XYZ hgG+RtkGvY0nZGcLLHBN/axxk/nhyAiz7w8J26R7XK/2RNpIHxsT8Z0PYaseDIYcHbhi bNwMrhQ9xqisED8ogYIw2zbtZUZ3cnPge4ZxXVFHqGK3BrHezfI96aVBKZy8RfO70kHm m7qsmSTeDZUbOjYtmgveEJhk+kJ9PJczW8BTI64RubMy95y3IISGMwV9tKpeKlpyTbQQ vvyw== X-RZG-AUTH: ":Ln4Re0+Ic/6oZXR1YgKryK8brlshOcZlIWs+iCP5vnk6shH+AHjwLuWOHqfyyvs=" X-RZG-CLASS-ID: mo00 Received: from bruno.haible.de by smtp.strato.de (RZmta 47.12.1 DYNA|AUTH) with ESMTPSA id u0aa20x0F9p3jTu (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); Fri, 15 Jan 2021 10:51:03 +0100 (CET) From: Bruno Haible To: Alexandre Duret-Lutz Subject: Re: clang++ hard failure with GNULIB_NAMESPACE Date: Fri, 15 Jan 2021 10:51:02 +0100 Message-ID: <3481842.QgHHNxatZX@omega> User-Agent: KMail/5.1.3 (Linux/4.4.0-197-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: <87o8hrfxbw.fsf_-_@lrde.epita.fr> References: <87turkvkud.fsf@lrde.epita.fr> <87eein6c2b.fsf@lrde.epita.fr> <87o8hrfxbw.fsf_-_@lrde.epita.fr> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Received-SPF: none client-ip=85.215.255.52; envelope-from=bruno@clisp.org; helo=mo4-p01-ob.smtp.rzone.de X-Spam_score_int: -22 X-Spam_score: -2.3 X-Spam_bar: -- X-Spam_report: (-2.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, NICE_REPLY_A=-0.237, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: , Cc: bug-gnulib@gnu.org Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" Hi Alexandre, > Using clang++ 11, compilation fails because of the overloads of memchr > and friends. Note that clang++11 defines __GNUC__ and __GNU_MINOR__ as > 4 and 2 (Yuck!) so the two _GL_CXXALIASWARN1 calls dealing with the two > overloads in lib/string.h are not performed. > > In file included from bitvect.cc:28: > In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/cstring:42: > ../../lib/string.h:693:1: error: reference to overloaded function could not be resolved; did you mean to call it? > _GL_CXXALIASWARN (memchr); > ^~~~~~~~~~~~~~~~~~~~~~~~~ On which version of glibc do you see this? On my machine, the testdir created through $ ./gnulib-tool --create-testdir --dir=../testdir4 --single-configure --with-c++-tests memchr rawmemchr strchrnul compiles fine with clang 11 and these environment variable settings: CC=$HOME/inst-clang/11.0.0/bin/clang CXX="$HOME/inst-clang/11.0.0/bin/clang++ -L/usr/lib/gcc/x86_64-linux-gnu/5 -I/usr/include/c++/5 -I/usr/include/x86_64-linux-gnu/c++/5" export CC CXX Does this same testdir work for you? If yes, can you show a small .cc file that exhibits the problem? If I can't reproduce it, I'll have to ask you for appropriate modifications of gnulib/lib/string.in.h that make things for work you. Bruno