First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 7768
Product:  
Component:  
Status: RESOLVED
Resolution: FIXED
Assigned To: Nathan Sidwell <nathan@gcc.gnu.org>
Host:
Reported against  
Priority:  
Severity:  
Target Milestone:  
 
 
Target:
Reporter: Bill Clarke <llib@computer.org>
Add CC:
CC:
Remove selected CCs
Build:
URL:
Summary:
Keywords:
Known to work:
Known to fail:

Attachment Description Type Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 7768 depends on: Show dependency tree
Show dependency graph
Bug 7768 blocks:

Additional Comments:






View Bug Activity   |   Format For Printing   |   Clone This Bug


Description:   Last confirmed: Opened: 2002-08-29 18:56
__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++

------- Comment #1 From Nathan Sidwell 2002-09-13 13:41 -------
State-Changed-From-To: open->analyzed
State-Changed-Why: confirmed

------- Comment #2 From Nathan Sidwell 2002-09-14 12:17 -------
Responsible-Changed-From-To: unassigned->nathan
Responsible-Changed-Why: patching

------- Comment #3 From Nathan Sidwell 2002-09-14 16:24 -------
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.

------- Comment #4 From Nathan Sidwell 2002-09-14 23:19 -------
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

First Last Prev Next    No search results available      Search page      Enter new bug