[llvm-bugs] [Bug 30943] New: __PRETTY_FUNCTION__ does not use the new c++11 namespace
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Nov 8 01:53:50 PST 2016
https://llvm.org/bugs/show_bug.cgi?id=30943
Bug ID: 30943
Summary: __PRETTY_FUNCTION__ does not use the new c++11
namespace
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: csaba.kertesz at gmail.com
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
When __PRETTY_FUNCTION__ creates the function signature, it should use the new
c++11 namespace.
Minimal test case:
#include <stdio.h>
#include <string>
std::string foo()
{
printf("%s\n", __PRETTY_FUNCTION__);
return "";
}
int main(int argc, char **argv)
{
foo();
}
When compiled and run with:
- g++ and -D_GLIBCXX_USE_CXX11_ABI=0:
std::string foo()
- g++ and -D_GLIBCXX_USE_CXX11_ABI=1 (default for g++):
std::__cxx11::string foo()
- clang++ (4.0.0-svn286079-1~exp1):
std::string foo()
I think clang should output "std::__cxx11::string foo()", at least for
compatibility with g++.
--
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/20161108/b888a995/attachment.html>
More information about the llvm-bugs
mailing list