[llvm-bugs] [Bug 28395] New: Libc++ must guard against C++17 inline variable ABI breaks.

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Jul 1 16:18:52 PDT 2016


https://llvm.org/bugs/show_bug.cgi?id=28395

            Bug ID: 28395
           Summary: Libc++ must guard against C++17 inline variable ABI
                    breaks.
           Product: libc++
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: eric at efcs.ca
                CC: llvm-bugs at lists.llvm.org, mclow.lists at gmail.com
    Classification: Unclassified

C++17 inline variables change the semantics surrounding how static data members
are defined. Previously static data members were required to be explicitly
defined once. In C++17 the compiler emits a potentially-discardable
definition in every TU where the data member is ODR-used. Even explicit
definitions of inline variables can be discarded.

This is problematic for Libc++ since it causes definitions previously provided
by libc++.dylib to disappear. This can cause ABI breakage if a C++17 dylib is
linked with a C++14 program.

The following symbols in libc++.dylib are affected (as of July 1st, 2016):

* std::chrono::steady_clock::is_steady
* std::chrono::system_clock::is_steady

I will introduce a workaround in libc++ itself until PR28394 is resolved.
(https://llvm.org/bugs/show_bug.cgi?id=28394)

-- 
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/20160701/d0de16f5/attachment.html>


More information about the llvm-bugs mailing list