禁止来自系统标题的警告不起作用

时间:2018-12-06 17:23:21

标签: header g++ suppress-warnings

我尝试编译gmock标头并收到大量警告,例如:

  

/opt/foreign_components/gmock-1.7.0/fused-src/gtest/gtest.h:10298:40:警告:'testing :: internal :: ParamIteratorInterface * testing :: internal :: ValuesInIteratorRangeGenerator :: Iterator: :Clone()const [with T = bool]'可以标记为覆盖[-Wsuggest-override]

我已经在-isystem中包含了gmock标头,如下所述: How to suppress GCC warnings from library headers?

我使用:

  

g ++-建议覆盖-I ../ -I ../../generic/ -isystem /opt/foreign_components/gmock-1.7.0/fused-src/gmock/ -isystem / opt / foreign_components / gmock -1.7.0 / fused-src -g-墙-pedantic -pthread -std = c ++ 14 -O2 /opt/foreign_components/gmock-1.7.0/fused-src/gmock-gtest-all.cc -c- o build-ut-std-xsysg-nomemdbg-o2-dynamic-noncov // opt / foreign_components / gmock-1.7.0 /fused-src/gmock-gtest-all.o

我该如何解决这个问题?

0 个答案:

没有答案