Pointer to current function
问题 Is there any way to get a pointer to the current function, maybe through gcc extensions or some other trickery? Edit I'm curious whether it is possible to get the function pointer without ever explicitly using the function's name. I thought I had a good reason for wanting this, realized that I didn't really, but am still curious if it is possible. 回答1: This isn't especially portable, but should work on at least some platforms (i.e., Linux and OSX, where I can check the documentation; it