_AddressOfReturnAddress_ReturnAddress

最佳答案:

__builtin_return_address()_ReturnAddress()__builtin_frame_address()_AddressOfReturnAddress()
std::cout<< ((int64_t) __builtin_return_address(0)) << ' '
         << ((int64_t) __builtin_frame_address (0)) << ' '
         <<*((int64_t*)__builtin_frame_address (0)+1)<<'\n';

…在OSX机器上打印以下内容。
140735807202733 140734600362944 140735807202733