This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Predefined Names in GCC C++, where are they _all_ documented
- From: Nathan Sidwell <nathan at codesourcery dot com>
- To: Paul E Condon <pecondon at mesanetworks dot net>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Tue, 11 Jan 2005 16:03:41 +0000
- Subject: Re: Predefined Names in GCC C++, where are they _all_ documented
- Organization: CodeSourcery LLC
- References: <20050111025125.GC20186@big>
Paul E Condon wrote:
I have a need for a way to have an object/class be aware of it own
text name. I think I can do this with __FUNCTION__ , but if I could
find an exhaustive list of predefineds maybe something else would
be more appropriate. Where can I find such a list. Also, I need to
know which of these are part of standard C++ and which are special
to GCC.
__FUNCTION__ & __PRETTY_FUNCTION__ are gnu extensions
to C and C++ standards. Look in the extensions section of the GCC
manual. They provide information to a function (member or non-member).
They do not provide information to a class or object, but
perhaps they'll fulfil your need.
nathan
--
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
nathan@codesourcery.com :: http://www.planetfall.pwp.blueyonder.co.uk