This is GCC Bugzilla
This is GCC Bugzilla Version 2.20+
View Bug Activity | Format For Printing | Clone This Bug
__PRETTY_FUNCTION__ in a destructor of a template looks like a constructor that returns void and takes no args: e.g., this code: // begins #include <iostream> template <typename T> struct X { X() { std::cout << __PRETTY_FUNCTION__ << std::endl; } ~X() { std::cout << __PRETTY_FUNCTION__ << std::endl; } }; int main() { { X<int> x; } return 0; } // ends when compiled and executed produces: X<T>::X() [with T = int] void X<T>::X() [with T = int] Release: 3.1.1 Environment: System: SunOS bullet 5.8 Generic_108528-15 sun4u sparc SUNW,Ultra-5_10 Architecture: sun4 host: sparc-sun-solaris2.8 build: sparc-sun-solaris2.8 target: sparc-sun-solaris2.8 configured with: ../gcc-3.1.1/configure --with-cpu=ultrasparc --enable-lanaguages=c,c++,f77 : (reconfigured) ../gcc-3.1.1/configure --with-cpu=ultrasparc --enable-languages=c,c++,f77 How-To-Repeat: compile and run above code with g++
State-Changed-From-To: open->analyzed State-Changed-Why: confirmed
Responsible-Changed-From-To: unassigned->nathan Responsible-Changed-Why: patching
State-Changed-From-To: analyzed->closed State-Changed-Why: 2002-09-14 Nathan Sidwell <nathan@codesourcery.com> PR c++/7768 * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
From: nathan@gcc.gnu.org To: gcc-gnats@gcc.gnu.org Cc: Subject: c++/7768 Date: 14 Sep 2002 23:19:48 -0000 CVSROOT: /cvs/gcc Module name: gcc Changes by: nathan@gcc.gnu.org 2002-09-14 16:19:48 Modified files: gcc/cp : ChangeLog pt.c gcc/testsuite : ChangeLog Added files: gcc/testsuite/g++.dg/template: pretty1.C Log message: cp: PR c++/7768 * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P. testsuite: * g++.dg/template/pretty1.C: New test Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.2955&r2=1.2956 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/pt.c.diff?cvsroot=gcc&r1=1.613&r2=1.614 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.2069&r2=1.2070 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/pretty1.C.diff?cvsroot=gcc&r1=NONE&r2=1.1