Tom G. Christensen wrote:
> In file included from test-list-c++.cc:23:
> ../gllib/string.h:1010:1: error: 'std::size_t strcspn(const char*, const 
> char*)' conflicts with a previous declaration
>   1010 | _GL_WARN_ON_USE (strcspn, "strcspn cannot work correctly on 
> character strings "
>        | ^~~~~~~~~~~~~~~
> In file included from /usr/include/string.h:18,
>                   from ../gllib/string.h:41,
>                   from test-list-c++.cc:23:
> /usr/include/iso/string_iso.h:67:15: note: previous declaration 
> 'std::size_t std::strcspn(const char*, const char*)'
>     67 | extern size_t strcspn(const char *, const char *);
>        |               ^~~~~~~
> 

This is not something we can easily fix. You see that the cited
strcspn declarations are the same, yet they "conflict". I guess
problem is that the one in /usr/include/iso/string_iso.h is not
in the "C" namespace.

Generally, these C++ tests are supported on glibc systems with
modern GCC. For testing Solaris 10, try passing the option
'--without-c++-tests' to gnulib-tool.

Bruno


Reply via email to