That was actually the second error I got. I had to work around this first one to get to it:
$ /opt/IBM/xlC/16.1.0/bin/xlclang++ test.cc -I gnulib/import -I ../gnulib/import/ In file included from test.cc:2: In file included from gnulib/import/stdlib.h:36: In file included from /opt/IBM/xlC/16.1.0/include2/c++/stdlib.h:94: /opt/IBM/xlC/16.1.0/include2/aix/stdlib.h:310:9: error: an attribute list cannot appear here extern _Noreturn void exit(int); ^~~~~~~~~ ./gnulib/config.h:1117:21: note: expanded from macro '_Noreturn' # define _Noreturn [[noreturn]] ^~~~~~~~~~~~ In file included from test.cc:2: In file included from gnulib/import/stdlib.h:36: In file included from /opt/IBM/xlC/16.1.0/include2/c++/stdlib.h:94: /opt/IBM/xlC/16.1.0/include2/aix/stdlib.h:319:9: error: an attribute list cannot appear here extern _Noreturn void quick_exit(int); ^~~~~~~~~ ./gnulib/config.h:1117:21: note: expanded from macro '_Noreturn' # define _Noreturn [[noreturn]] ^~~~~~~~~~~~ 2 errors generated. Error while processing test.cc. $ cat test.cc #include "gnulib/config.h" #include <stdlib.h> int main() { } (same modules) Christian On Mon, Dec 2, 2019 at 7:25 PM Christian Biesinger <cbiesin...@google.com> wrote: > > (tested on the GCC compile farm, gcc119, /opt/IBM/xlC/16.1.0/bin/xlclang++) > > /opt/IBM/xlC/16.1.0/include2/c++/__bsd_locale_fallbacks.h:50:12: > error: no matching function for call to > 'wcsnrtombs' > return wcsnrtombs(__dest, __src, __nwc, __len, __ps); > ^~~~~~~~~~ > /usr/include/wchar.h:444:15: note: candidate function not viable: no > known conversion from 'rpl_mbstate_t *' > (aka 'int *') to 'mbstate_t *' (aka 'char **') for 5th argument > extern size_t wcsnrtombs(char *, const wchar_t **, size_t, size_t, mbstate_t > *); > ^ > > /opt/IBM/xlC/16.1.0/include2/c++/__bsd_locale_fallbacks.h:87:12: > error: no matching function for call to 'mbrlen' > return mbrlen(__s, __n, __ps); > ^~~~~~ > /usr/include/wchar.h:354:15: note: candidate function not viable: no > known conversion from 'rpl_mbstate_t *' > (aka 'int *') to 'mbstate_t *' (aka 'char **') for 3rd argument > extern size_t mbrlen(const char * __restrict__, size_t, mbstate_t > *__restrict__); > ^ > > (similar for a few other mb*/wc* functions) > > Testcase: > #include "gnulib/config.h" > #include <wchar.h> // optional > #include <sstream> > > int main() { > } > > Enabled modules: > IMPORTED_GNULIB_MODULES="\ > alloca \ > canonicalize-lgpl \ > dirent \ > dirfd \ > errno \ > fnmatch-gnu \ > frexpl \ > getcwd \ > glob \ > inet_ntop > inttypes \ > lstat \ > limits-h \ > memchr \ > memmem \ > mkdir \ > mkdtemp \ > mkostemp \ > pathmax \ > rawmemchr \ > readlink \ > rename \ > setenv \ > signal-h \ > strchrnul \ > strerror_r-posix \ > strstr \ > strtok_r \ > sys_stat \ > time_r \ > unistd \ > unsetenv \ > update-copyright \ > wchar \ > wctype-h \ > " > > Let me know if you need any further information. > > Christian