You can do something like:
void *get_sp(void) { volatile char c; return (void *)&c; }
void *get_sp(void) { return __builtin_frame_address(0); }