bug-gnulib
[Top][All Lists]
Advanced

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

Compile error with xlclang++ on AIX


From: Christian Biesinger
Subject: Compile error with xlclang++ on AIX
Date: Mon, 2 Dec 2019 19:25:06 -0600

(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



reply via email to

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