c – Meaning of "__"


In the Linux kernel implementation , I came across this statement on line 89:

#define _THIS_IP_ ({ __label__ __here; __here: (unsigned long)&&__here; })

I know that in C , symbols starting with a _ followed by a capital letter or another _ are reserved for the implementation, what does that mean in practice?


The use of two underscores ('__') in identifiers is reserved for internal use by the compiler according to the ANSI-C Technical Standard . In practice, this is done to avoid a collision with developer-defined names.

In C, symbols starting with an underscore followed by a capital letter or another underscore are reserved for the implementation. You as a C user must not create any symbols that start with the reserved strings.


Scroll to Top