public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/35387]  New: __PRETTY_FUNCTION__ produces inconsistent output
@ 2008-02-27  8:52 d dot frey at gmx dot de
  2008-02-27  9:35 ` [Bug c++/35387] " rguenth at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: d dot frey at gmx dot de @ 2008-02-27  8:52 UTC (permalink / raw)
  To: gcc-bugs

Minimal example program:

#include <iostream>
#include <algorithm>

template< typename T > struct A;

template< typename T, typename U > struct A< std::pair< T, U > >
{
  static void f()
  {
    std::cout << __PRETTY_FUNCTION__ << std::endl;
  }
};

int main()
{
  A< std::pair< int, int > >::f();
}


Output of __PRETTY_FUNCTION__ from this program:

static void A<std::pair<_T1, _T2> >::f() [with T = int, U = int]

Problem:

_T1 and _T2 are printed as the pair's parameter names, but it then say T=int
and U=int.

Additional information:

This only seems to occur with partial specialization.


-- 
           Summary: __PRETTY_FUNCTION__ produces inconsistent output
           Product: gcc
           Version: 4.2.1
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: d dot frey at gmx dot de


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


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

end of thread, other threads:[~2008-02-28 17:08 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-27  8:52 [Bug c++/35387] New: __PRETTY_FUNCTION__ produces inconsistent output d dot frey at gmx dot de
2008-02-27  9:35 ` [Bug c++/35387] " rguenth at gcc dot gnu dot org
2008-02-27 12:03 ` d dot frey at gmx dot de
2008-02-27 13:01 ` manu at gcc dot gnu dot org
2008-02-27 21:59 ` d dot frey at gmx dot de
2008-02-27 22:46 ` pinskia at gcc dot gnu dot org
2008-02-28  8:15 ` d dot frey at gmx dot de
2008-02-28 17:08 ` pinskia at gcc dot gnu dot org

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).