_THIS_IP_ macro in linux kernel
c, linux-kernel
Solution
The second `&` in `&&` is necessary to make GCC lookup the name as a label, instead of as a variable. For example
foo: ;
int foo;
void *p1 = &&foo;
void *p2 = &foo;
The second initializer refers to the int variable.
Problem
The following macro appears in include/linux/kernel.h ``` #define _THIS_IP_ ({ __label__ __here; __here: (unsigned long)&&__here; }) ``` I don't understand what the second & applied to __here would do. The first takes the address of the local label, but what about the second?