Macro __FUNCTION__ in C++

Jason Merrill jason@cygnus.com
Sun Sep 13 04:03:00 GMT 1998


>>>>> Ryszard Kabatek <rysio@rumcajs.chemie.uni-halle.de> writes:

 > The macro __FUNCTION__, or in C9X draft the identifier __func__, 
 > returns the name of the current function without
 > the namespace and without the argument types.

 > It's good for the C language, but in C++ would be useful something like:

 > '::A::B::calc(int, double) const' instead of 'calc'

Try __PRETTY_FUNCTION__.

Jason



More information about the Gcc mailing list