Whole document tree
4.38 Function Names as Strings
GNU CC predefines two string variables to be the name of the current function.
The variable These names are always the same in a C function, but in a C++ function they may be different. For example, this program:
gives this output:
These names are not macros: they are predefined string variables.
For example, `#ifdef __FUNCTION__' does not have any special
meaning inside a function, since the preprocessor does not do anything
special with the identifier This document was generated by root on January, 30 2002 using texi2html |