c++/9622: __PRETTY_FUNCION__ incorrect in template dtors

jamagallon@able.es jamagallon@able.es
Sat Feb 8 00:06:00 GMT 2003


>Number:         9622
>Category:       c++
>Synopsis:       __PRETTY_FUNCION__ incorrect in template dtors
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          wrong-code
>Submitter-Id:   net
>Arrival-Date:   Sat Feb 08 00:06:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     jamagallon@able.es
>Release:        3.2.1
>Organization:
>Environment:
werewolf:~/bug> gcc --version
gcc-3.2.1 (GCC) 3.2.1 (Mandrake Linux 9.1 3.2.1-6mdk)
>Description:
simple example:
#include <iostream>

using namespace std;

class A {
public:
        A() { cout << __PRETTY_FUNCTION__ << endl; };
        ~A() { cout << __PRETTY_FUNCTION__ << endl; };
};

template<class T>
class B {
public:
        B() { cout << __PRETTY_FUNCTION__ << endl; };
        ~B() { cout << __PRETTY_FUNCTION__ << endl; };
};

int main()
{
        A a;
        B<int> b;

        return 0;
}

Result:
werewolf:~/bug> g++ -O2 bug.cc -o bug
werewolf:~/bug> bug
A::A()
B<T>::B() [with T = int]
void B<T>::B() [with T = int]
A::~A()
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the Gcc-bugs mailing list