Yep. Do "info gcc" on your system and go to the "Function Names" node. Here is the relevant text; GCC predefines two magic identifiers to hold the name of the current function. The identifier `__FUNCTION__' holds the name of the function as it appears in the source. The identifier `__PRETTY_FUNCTION__' holds the name of the function pretty printed in a language specific fashion. Thanks Ram -----Original Message----- From: vu pham [mailto:vu@xxxxxxxxxx] Sent: Tuesday, December 02, 2003 12:20 PM To: gcc-help@xxxxxxxxxxx Subject: function name macro Hi all, Is there any macro that produces the function name of the function that uses this macro ? For example : int foo( int a ) { printf( __FUNCTION_NAME__ " a = %d", a ); . . . } Thanks, Vu