[Bug c++/39813] New: [feature request] __PRETTY_FUNCTION__ addition

2009-04-19 Thread gcc at daryl dot haresign dot com
Given the following code:
  template 
  struct A
  {
void fn() { cout << __PRETTY_FUNCTION__ << endl; }
  };

  struct B
  {
template 
void fn() { cout << __PRETTY_FUNCTION__ << endl; }
  };

  int main()
  {
A().fn();
B().fn();
  }

g++ outputs:
  void A::fn() [with T = int]
  void B::fn() [with T = int]

I think that the latter should output:
  void B::fn() [with T = int]


-- 
   Summary: [feature request] __PRETTY_FUNCTION__ addition
   Product: gcc
   Version: 4.4.0
Status: UNCONFIRMED
  Severity: enhancement
  Priority: P3
 Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
    ReportedBy: gcc at daryl dot haresign dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39813



[Bug c++/39813] [feature request] __PRETTY_FUNCTION__ addition

2009-12-29 Thread gcc at daryl dot haresign dot com


--- Comment #1 from gcc at daryl dot haresign dot com  2009-12-29 14:55 
---
I've just looked at this again. It seems the  is not being printed in the
second case due to the line:

1463   && !DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION(t)

in gcc/cp/error.c, in the function dump_function_name. If I comment out that
line, I get the . I doubt the fix is as simple as that, however.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39813