__func__ and C++
Matt Austern
austern@apple.com
Tue Sep 2 18:24:00 GMT 2003
Inside a destructor, __func__ and __FUNCTION__ return "foo", not
"~foo". (__PRETTY_FUNCTION__ behaves the way I would expect.)
Is this behavior intended, or is it a bug? The gcc manual merely says
that __func__ is supposed to return the function's name without a type
signature, and doesn't say what that's supposed to mean in the case of
special C++ functions. Since __func__ in C++ is a gcc extension, none
of the language standards provide any useful guidance.
--Matt
More information about the Gcc
mailing list