Issue 153232
Summary [libc++] Removing C linkage causes build failures where OS provides some POSIX functions
Labels libc++, platform:aix
Assignees
Reporter ZarkoT
    Small test case:
```
cat vasprintf.cpp
#include <locale>

extern "C" int vasprintf (char **, const char *, va_list);
$>clang++_r -c vasprintf.cpp
vasprintf.cpp:3:16: error: declaration of 'vasprintf' has a different language linkage
    3 | extern "C" int vasprintf (char **, const char *, va_list);
      | ^
/home/zarko/llvm/dev/build/bin/../include/c++/v1/__locale_dir/locale_base_api/ibm.h:83:48: note: previous definition is here
   83 | _LIBCPP_ATTRIBUTE_FORMAT(__printf__, 2, 0) int vasprintf(char** strp, const char* fmt, va_list ap) {
      | ^
1 error generated.
```

Looks like it's caused by this change to the linkage: https://github.com/llvm/llvm-project/pull/94102
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to