bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: clang++ hard failure with GNULIB_NAMESPACE


From: Bruno Haible
Subject: Re: clang++ hard failure with GNULIB_NAMESPACE
Date: Fri, 15 Jan 2021 10:51:02 +0100
User-agent: KMail/5.1.3 (Linux/4.4.0-197-generic; KDE/5.18.0; x86_64; ; )

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]