运行夹板

matt@stanley:~/cpfs$ splint -paramuse +gnuextensions cpfs.c

停在这条线上:

__thread int cpfs_errno;

带有解析错误:

cpfs.c:127:13: Parse Error: Non-function declaration: __thread :
               int. (For help on parse errors, see splint -help parseerrors.)
*** Cannot continue.

检查文档和gargle没有提及 __thread. 。然而 __thread 是C99规格的一部分, ,据称夹板支持(插入参考)。

这里发生了什么?我如何才能识别夹板 __thread?

有帮助吗?

解决方案

来自 夹板常见问题解答, ,只要添加 -D__thread= 到夹板命令行。这将具有删除 __thread 夹板检查时,来自代码的关键字。我在这里假设夹板并不是特别意识到的线程,并且无法使用关键字传达给GCC的信息。

其他提示

__thread 不在C99中。这是GNU C扩展名 - 您已链接到的部分在其中 C语言家族的扩展. 。它描述了C99标准的变化的扩展,大概是准备在未来的标准修订中采用的扩展。

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top