小编Ind*_*tal的帖子

如何获得与C++ 0x标准兼容的Coverity静态分析?

我使用的是Wind River Compiler 4(gcc(C)和g ++(C++)),它可以毫无问题地编译我的所有项目.现在我必须使用Coverity Static Analysis来检查我的代码.我已经配置了特定的编译器.对于C代码(gcc)没有问题,我可以运行分析,但对于C++ - Code(g ++),我遇到了很多错误:

.../c++config.h", line 214: error #40:
    expected an identifier
inline namespace __gnu_cxx_ldbl128 { }
       ^

.../c++config.h", line 214: error #326:
    inline specifier allowed on function declarations only
inline namespace __gnu_cxx_ldbl128 { }
^

.../c++config.h", line 214: error #65:
    expected a ";"
inline namespace __gnu_cxx_ldbl128 { }
                                   ^
.../include/string.h", line 76: error #312:
    cannot overload functions distinguished by return type alone
extern __const void *memchr (__const void *__s, int __c, size_t __n) …
Run Code Online (Sandbox Code Playgroud)

c++ static-analysis coverity-prevent c++11 inline-namespaces

7
推荐指数
2
解决办法
1万
查看次数