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

#line 指定的行号为 0 或大于规定值

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

C++03 规定行号不可大于 32767,C++11 规定不可大于 2147483647,否则导致未定义的行为。

示例:

#line 0             // Undefined behavior
#line 2147483648    // Undefined behavior

依据

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

规则

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