Pointer to current function

前端 未结 4 1223
难免孤独
难免孤独 2020-12-19 13:06

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 poss

4条回答
  •  囚心锁ツ
    2020-12-19 13:34

    No. In a three-letter answer. In C++ member functions you can have a "this" pointer that does something similar, but there's nothing equivalent in C.

    However, since you can't define anonymous functions, there's little need for such a feature.

提交回复
热议问题