[llvm-bugs] [Bug 38920] New: clang ODR checker errors on (real) ODR violation in libstdc++ headers
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Sep 12 14:28:45 PDT 2018
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: rtrieu at google.com
Reporter: richard-llvm at metafoo.co.uk
CC: dgregor at apple.com, llvm-bugs at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180912/3bc91f2e/attachment.html>
More information about the llvm-bugs
mailing list