There is a very convenient set of predefined macros - __FILE__, __LINE__ and __FUNCTION__. These defines work in GCC, ICC, MSVC, clang.
But, unfortunately macro __FUNCTION__ is absent in Solaris Studio 12.3. Would you please introduce this predefined macro in the next version of Solaris Studio? Of course, if it does not break anything.
It should work similar to __LINE__, __FILE__ i.e. like a string literal.
P.S.
I know that it is not standart, but it is very convenient and supported by mainstream compilers.