Path: utzoo!attcan!uunet!aplcen!uakari.primate.wisc.edu!zaphod.mps.ohio-state.edu!rpi!sci.ccny.cuny.edu!phri!marob!daveh From: daveh@marob.masa.com (Dave Hammond) Newsgroups: comp.lang.c Subject: preprocessor constant which names the current function (like __FILE__) Message-ID: <25D1A098.493B@marob.masa.com> Date: 8 Feb 90 16:38:46 GMT Sender: daveh@marob.masa.com Reply-To: daveh@marob.masa.com (Dave Hammond) Organization: ESCC, New York City Lines: 19 I am constructing an error notification routine which outputs an error code, the name of the C function which called the error routine, and an error message. The current interface requires the programmer to name the function, ie: Error(int errcode, char *function_name, ...) It would save coding time (and make the interface simpler) if C provided a compile-time method for determining the current function name. Given that the C preprocessor definitions __FILE__ and __LINE__ specify the current source module and line, is there an analagous definition for the current source function (eg __FUNCTION__) ? -- Dave Hammond daveh@marob.masa.com daveh@dsix2.uucp