[llvm-bugs] [Bug 24844] New: undefined reference to std::ios_base::failure::failure
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Sep 16 10:30:27 PDT 2015
https://llvm.org/bugs/show_bug.cgi?id=24844
Bug ID: 24844
Summary: undefined reference to std::ios_base::failure::failure
Product: clang
Version: 3.7
Hardware: PC
OS: Windows XP
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: daniel.f.starke at freenet.de
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
Using Clang/LLVM 3.7.0 in combination with GCC 5.2.0 to compile a simple
application like this:
#include <iostream>
#include <string>
int main() {
std::string msg = "hello world";
std::ios_base::failure f(msg);
return 0;
}
gives me the following error (it compiles without an error with g++):
2fb172.o:(.text+0xa7): undefined reference to
`std::ios_base::failure::failure(std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&)'
Reducing the pre-processed test case and comparing the assembly for the called
function gives
_ZNSt8ios_base7failureB5cxx11C1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
for GCC and
_ZNSt8ios_base7failureC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
for Clang.
Or better readable...
GCC sees:
std::ios_base::failure[abi:cxx11]::cxx11(std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&)
Clang sees: std::ios_base::failure::failure(std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&)
I guess this might be due to the lacking support for __attribute__((__abi_tag__
("cxx11"))) in Clang.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150916/aa0ebfe3/attachment.html>
More information about the llvm-bugs
mailing list