I was looking at some PETSc example code, and I came across this snippet:
#undef __FUNCT__
#define __FUNCT__ "main"
right before main begins.
Is setting __FUNCT__ or something like it before every function (or just main?) a standard C programming convention?
If so, why is this done?
This appears to be shorthand or a work-around for a C compiler that doesn’t support the
__FUNCTION__standard macro.