This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/44486] New: missing space in __PRETTY_FUNCTION__ expansion in anonymous namespace
- From: "msebor at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Jun 2010 21:21:42 -0000
- Subject: [Bug c++/44486] New: missing space in __PRETTY_FUNCTION__ expansion in anonymous namespace
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The "S<unnamed>::f()" text reads as though S were a template. I suspect the
text is simply missing a space between the S and <unnamed> but I wonder if
the <unnamed> bit could actually be replaced by something less ambiguous
in C++ (such as /* unnamed */ or perhaps better still, /* anonymous */).
Btw., since glibc uses __PRETTY_FUNCTION__ in its definition of the assert()
macro this shows up in quite a bit of output.
$ cat t.cpp && g++ -dumpversion && g++ t.cpp && ./a.out
#include <cstdio>
struct S { };
namespace { S f() { std::puts(__PRETTY_FUNCTION__); return S(); } }
int main() { f(); }
4.4.3
S<unnamed>::f()
--
Summary: missing space in __PRETTY_FUNCTION__ expansion in
anonymous namespace
Product: gcc
Version: 4.4.3
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: msebor at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44486