Another compilation error with xlclang on AIX 7.2 is this one: depbase=`echo test-string-c++.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\ xlclang++ -qthreaded -qtls -DHAVE_CONFIG_H -DEXEEXT=\"\" -I. -I../../gltests -I.. -DGNULIB_STRICT_CHECKING=1 -DIN_GNULIB_TESTS=1 -I. -I../../gltests -I.. -I../../gltests/.. -I../gllib -I../../gltests/../gllib -I/home/haible/prefix32/include -D_THREAD_SAFE -Wno-error -g -O2 -MT test-string-c++.o -MD -MP -MF $depbase.Tpo -c -o test-string-c++.o ../../gltests/test-string-c++.cc &&\ mv -f $depbase.Tpo $depbase.Po In file included from ../../gltests/test-string-c++.cc:22: ../gllib/string.h:1453:19: error: use of undeclared identifier 'mbslen'; did you mean 'gnulib::mbslen'? _GL_CXXALIASWARN (mbslen); ^ ../gllib/string.h:1446:19: note: 'gnulib::mbslen' declared here _GL_CXXALIAS_RPL (mbslen, size_t, (const char *string)); ^ 1 error generated. Error while processing ../../gltests/test-string-c++.cc. Makefile:23408: recipe for target 'test-string-c++.o' failed gmake[4]: *** [test-string-c++.o] Error 1
Fixed through this patch. 2022-09-10 Bruno Haible <br...@clisp.org> string: Fix compilation error in C++ mode on AIX 7.2 with xlclang. * lib/string.in.h (mbslen): Enable the C++ alias warning only on glibc systems. diff --git a/lib/string.in.h b/lib/string.in.h index 3996da9fcb..e56f6db0c9 100644 --- a/lib/string.in.h +++ b/lib/string.in.h @@ -943,7 +943,9 @@ _GL_FUNCDECL_SYS (mbslen, size_t, (const char *string) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_SYS (mbslen, size_t, (const char *string)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (mbslen); +# endif #endif #if @GNULIB_MBSNLEN@