☰
  • 首页
  • 规则分类
  • 项目介绍
search
•••

预处理运算符 ## 的结果不是有效的符号

C++-Undefined-Behavior-74
目录 › next › previous

示例:

#define M(a, b)  a ## b

int M(x, 0) = 0;   // OK, ‘x0’ is a valid token
int M(0, x) = 0;   // Undefined behavior, ‘0x’ is not a valid token

依据

ISO/IEC 14882:2003 16.3.3(3)-undefined ISO/IEC 14882:2011 16.3.3(3)-undefined

规则

ID_macro_complexConcat
Copyright©2024 360 Security Technology Inc., Licensed under the Apache-2.0 license.