[llvm-bugs] [Bug 35689] New: Clang disagrees with GCC about abi:cxx11 for templated member functions.
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Dec 18 15:26:31 PST 2017
https://bugs.llvm.org/show_bug.cgi?id=35689
Bug ID: 35689
Summary: Clang disagrees with GCC about abi:cxx11 for templated
member functions.
Product: clang
Version: 4.0
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++11
Assignee: unassignedclangbugs at nondot.org
Reporter: jeremysalwen at gmail.com
CC: dgregor at apple.com, llvm-bugs at lists.llvm.org
Created attachment 19578
--> https://bugs.llvm.org/attachment.cgi?id=19578&action=edit
Program demonstrating the disagreement.
I have attached a minimized test case of the bug I am encountering, where g++
(5.4.0) and clang (-3.8, 3.9, 4.0) disagree on whether a function is given
[abi:cxx11] mangling.
Steps to reproduce:
$ g++ -std=c++11 -O1 main.cpp -c -o foo.o
$ objdump --syms /tmp/foo2.o | c++filt | grep bar
0000000000000000 l d .text._ZNK3fooIiE3barEPKcS2_ 0000000000000000
.text._ZNK3fooIiE3barEPKcS2_
0000000000000000 w F .text._ZNK3fooIiE3barEPKcS2_ 0000000000000017
foo<int>::bar(char const*, char const*) const
$ clang++-4.0 -std=c++11 -O1 main.cpp -c -o foo2.o
$ objdump --syms /tmp/foo2.o | c++filt | grep bar
0000000000000000 l d .text._ZNK3fooIiE3barB5cxx11EPKcS2_
0000000000000000 .text._ZNK3fooIiE3barB5cxx11EPKcS2_
0000000000000000 w F .text._ZNK3fooIiE3barB5cxx11EPKcS2_
0000000000000048 foo<int>::bar[abi:cxx11](char const*, char const*) const
Note that Clang thinks the function bar is cxx11 abi, while gcc does not. This
causes linking failures.
This bug was reduced from a boost::regex linking failure discussed here:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=823978
--
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/20171218/b89ee1fa/attachment.html>
More information about the llvm-bugs
mailing list