Am i really right that C standards guarantees that _ _ func _ _ value is always the name of the enclosing function, while in C++ (i mean C++11, of course) it can be any implementation-defined string (for example, if we have function foo without parameters, we can get something like "Some string fdgdg asdfs fsdf sd")?
ISO/IEC 9899:2011
6.4.2.2 Predefined identifiers
Semantics
1 The identifier _ _ func _ _ shall be implicitly declared by the translator as if, immediately following the opening brace of each function definition, the declaration static const char _ func _ [] = "function-name"; appeared, where function-name is the name of the lexically-enclosing function.
ISO/IEC 14882:2011
8.4.1 In general [dcl.fct.def.general]
8 The function-local predefined variable _ _ func _ _ is defined as if a definition of the form static const char _ _ func _ _ [] = "function-name "; had been provided, where function-name is an implementation-defined string. It is unspecified whether such a variable has an address distinct from that of any other object in the program.
And what's the reason for this? Return something like "Unknown" if we can't receive current function name?