#define st(x) do { x } while (__LINE__ == -1)
讲解:
__LINE__ 是个宏,它代表当前代码在源文件的行号,它是大于0的,所以__LINE__ == -1 等同于0,化简为:
#define st(x) do { x } while (0)
本文解释了一个特殊的C语言预处理指令用法,通过一个具体的宏定义示例来展示如何使用do-while循环与__LINE__宏结合实现特定的代码结构。
#define st(x) do { x } while (__LINE__ == -1)