This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Request for more info out of __FUNCTION__
- To: scherrey at proteus-tech dot com
- Subject: Re: Request for more info out of __FUNCTION__
- From: Michael Meissner <meissner at cygnus dot com>
- Date: Wed, 2 Feb 2000 14:23:59 -0500
- Cc: gcc <gcc at gcc dot gnu dot org>
- References: <38989006.8ABAE37B@switchco.com>
On Wed, Feb 02, 2000 at 02:13:58PM -0600, Benjamin Scherrey wrote:
> I have a little debug macro that displays where in my code I happen to
> be. It uses the __FILE__, __LINE__, and __FUNCTION__ compile-time
> variables to show me where the code is executing. One thing I would
> find very useful is if the __FUNCTION__ variable would show methods as
> "class::function" instead of just "function" as the messages kinda get
> hard to differentiate when going through class hierarchies or
> templated methods. Is this something that could easily be changed?
For G++ use __PRETTY_FUNCTION__ instead of __FUNCTION__, it will emit a string
that has the return type and the argument types.
--
Michael Meissner, Red Hat, Inc.
PMB 198, 174 Littleton Road #3, Westford, Massachusetts 01886
Work: meissner@redhat.com phone: 978-486-9304 fax: 978-692-4482
Non-work: meissner@spectacle-pond.org