public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/39813]  New: [feature request] __PRETTY_FUNCTION__ addition
@ 2009-04-19 11:27 gcc at daryl dot haresign dot com
  2009-12-29 14:55 ` [Bug c++/39813] " gcc at daryl dot haresign dot com
  0 siblings, 1 reply; 2+ messages in thread
From: gcc at daryl dot haresign dot com @ 2009-04-19 11:27 UTC (permalink / raw)
  To: gcc-bugs

Given the following code:
  template <typename T>
  struct A
  {
    void fn() { cout << __PRETTY_FUNCTION__ << endl; }
  };

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

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

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

I think that the latter should output:
  void B::fn<T>() [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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug c++/39813] [feature request] __PRETTY_FUNCTION__ addition
  2009-04-19 11:27 [Bug c++/39813] New: [feature request] __PRETTY_FUNCTION__ addition gcc at daryl dot haresign dot com
@ 2009-12-29 14:55 ` gcc at daryl dot haresign dot com
  0 siblings, 0 replies; 2+ messages in thread
From: gcc at daryl dot haresign dot com @ 2009-12-29 14:55 UTC (permalink / raw)
  To: gcc-bugs



------- 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 <T> 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 <T>. I doubt the fix is as simple as that, however.


-- 


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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-12-29 14:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-19 11:27 [Bug c++/39813] New: [feature request] __PRETTY_FUNCTION__ addition gcc at daryl dot haresign dot com
2009-12-29 14:55 ` [Bug c++/39813] " gcc at daryl dot haresign dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).