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

            Bug ID: 38920
           Summary: clang ODR checker errors on (real) ODR violation in
                    libstdc++ headers
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Modules
          Assignee: rtr...@google.com
          Reporter: richard-l...@metafoo.co.uk
                CC: dgre...@apple.com, llvm-bugs@lists.llvm.org

Our libstdc++ / modules buildbot is currently failing due to the modules ODR
checker finding a ODR violation in a libstdc++ header:

http://lab.llvm.org:8011/builders/clang-x86_64-linux-selfhost-modules-2/builds/26164/steps/compile.llvm.stage2/logs/stdio

There is a real ODR violation in this code. std::_Sp_counted_base::_M_release
calls __gnu_cxx::__exchange_and_add_dispatch, which is declared static.

While this is a bug in libstdc++, we do aim to support libstdc++ regardless of
its bugs, and so we should work around this. Assuming the above ODR violation
is indeed the reason that the check is failing, we could special-case this
particular function name when computing ODR hashes, and ensure that it always
hashes to the same value even when resolving to two different functions in
different translation units.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to