From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27434 invoked by alias); 19 Jul 2005 13:17:27 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 27414 invoked by uid 48); 19 Jul 2005 13:17:20 -0000 Date: Tue, 19 Jul 2005 13:34:00 -0000 From: "andyparkins at gmail dot com" To: gcc-bugs@gcc.gnu.org Message-ID: <20050719131716.22558.andyparkins@gmail.com> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/22558] New: __func__ and __FUNCTION__ are wrong for destructors X-Bugzilla-Reason: CC X-SW-Source: 2005-07/txt/msg02314.txt.bz2 List-Id: both __func__ and __FUNCTION__ don't include the tilde when used from a destructor. __PRETTY_FUNCTION__ does include the tilde. So, class Test { public: Test() { cerr << __func __ << endl; } ~Test() { cerr << __func__ << endl; } }; When constructing and destructing "Test" is output, when it should be "Test" and "~Test". In case it's needed: Reading specs from /usr/lib/gcc-lib/i486-linux-gnu/3.3.6/specs Configured with: ../src/configure -v --enable-languages=c,c++,java,f77,pascal,objc,ada,treelang --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --enable-__cxa_atexit --with-system-zlib --enable-nls --without-included-gettext --enable-clocale=gnu --enable-debug --enable-java-gc=boehm --enable-java-awt=xlib --enable-objc-gc i486-linux-gnu Thread model: posix gcc version 3.3.6 (Debian 1:3.3.6-7) -- Summary: __func__ and __FUNCTION__ are wrong for destructors Product: gcc Version: 3.3.6 Status: UNCONFIRMED Severity: minor Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: andyparkins at gmail dot com CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22558