<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - undefined reference to std::ios_base::failure::failure"
   href="https://llvm.org/bugs/show_bug.cgi?id=24844">24844</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>undefined reference to std::ios_base::failure::failure
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>3.7
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows XP
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>-New Bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>daniel.f.starke@freenet.de
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>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.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>