【发布时间】:2010-06-29 19:32:38
【问题描述】:
我正在尝试在包含标准 C 库中的 complex.h 的 C 源代码上运行 splint 以支持复杂算术。
很遗憾,splint 失败并出现以下错误。
夹板 3.1.2 --- 2009 年 5 月 3 日
/usr/include/bits/cmathcalls.h:54:31: 解析错误:非函数声明: _Complex :外部双精度。 (有关解析错误的帮助,请参阅 splint -help 解析错误。) *** 无法继续。
谷歌搜索该问题后,拆分讨论邮件列表中只有this message(仍未得到答复)。
有什么想法吗?
更新
这是一个非常简单的失败源示例:
#include <complex.h>
int main() {
complex x = 2 + 8i;
x = x + 1;
}
尝试重新定义不受支持的 _Complex C99 关键字会导致复数的虚部出现错误(我想这并不奇怪)。
lsc@deepthought:~$ splint-D_Complex=double temp.c
Splint 3.1.2 --- 03 May 2009
temp.c:4:20: Parse Error. (For help on
parse errors, see splint -help
parseerrors.)
*** Cannot continue.
【问题讨论】:
标签: c static-analysis complex-numbers splint