title: __func__ value difference between C and C++
body: <p>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")?</p>
  
  <p><strong>ISO/IEC 9899:2011</strong></p>
  
  <p>6.4.2.2 Predefined identifiers</p>
  
  <blockquote>
    <p>Semantics</p>
    
    <p>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 _ <em>func</em> _ [] =
    "function-name"; appeared, where <strong>function-name is the name of the
    lexically-enclosing function</strong>.</p>
  </blockquote>
  
  <p><strong>ISO/IEC 14882:2011</strong></p>
  
  <p>8.4.1 In general [dcl.fct.def.general]</p>
  
  <blockquote>
    <p>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 <strong>function-name is an implementation-defined
    string</strong>. It is unspecified whether such a variable has an address
    distinct from that of any other object in the program.</p>
  </blockquote>
  
  <p>And what's the reason for this? Return something like "Unknown" if we can't receive current function name?</p>