What does && mean in void *p = &&abc;

后端 未结 2 2137
旧时难觅i
旧时难觅i 2020-12-12 23:39

I came across a piece of code void *p = &&abc;. What is the significance of && here? I know about rvalue references but I think

2条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-12 23:46

    && is gcc's extension to get the address of the label defined in the current function.

    void *p = &&abc is illegal in standard C99 and C++.

    This compiles with g++.

提交回复
热议问题