what is the type of the label pointing to statement

This morning I come out with this question, what is the type of the label pointing to statement ?

int main( int argc, char **argv ) {
int a = 0;
int b = 0;
L:a += b;
a = 3;
}

What is the type of the label "L" in above code ?

How to storage the offset of executing stream from the function entry point ?

With these questions flirting me, I cannot keep laying on the bed.
> What is the type of the label "L" in above code ?
It doesn't have a type.
You can't do anything with them except use them in goto statements.

> How to storage the offset of executing stream from the function entry point ?
You can't(*).




(*) Not unless you're willing to use compiler specific extensions (YMMV).
https://gcc.gnu.org/onlinedocs/gcc-10.1.0/gcc/Labels-as-Values.html#Labels-as-Values
Such ! Amazing !!!

I almost gave up to find out the way to achieve this weird target, thank you ! Very very much !

Thank you for reply me, salem c !
Topic archived. No new replies allowed.