C99 mandates __func__, but unfortunately C++ and earlier C standards mandate no such thing. Even so, most compilers support __FUNCTION__, __PRETTY_FUNCTION__ (distinct in C++), or __func__. Inaccurate traces annoy me greatly and it's inevitable that __FUNCT__ is occasionally incorrect. It also seems a shame for traces to just say "USER provided function" when the compiler supports something better. So how about having configure check for the existance of a compiler-supported name, and perhaps also add an assertion to PetscFunctionBegin to error if __FUNCT__ does not match __FUNCTION__ (and is defined to something other than "User provided function", so that this wouldn't break user code that ignores __FUNCT__ entirely).
Jed
