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