i'm not convinced this is useful. if your program is sufficiently complicated to warrent this sort of debugging aid, just printing the caller's name (or pc) is most likely insufficient. most likely you're going to need to know the whole call stack. and likely function arguments and locals.
i did write a pretty large billing system that announced that selected functions had been called in the debugging log. even if we had been programming to c99 at the time, __func__ would not have been useful because we also printed out the most helpful arguments to the functions we were tracing. - erik On Sun Apr 9 16:58:17 CDT 2006, [EMAIL PROTECTED] wrote: > Nah, even simple function calls can use it. > > check(a, b, c, __func__); > > It's true, it would be nice to find out the caller from within check(), > but this achieves most of the utility with a much simpler implementation. >
