This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

__func__ and C++


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]