yaml-cpp
yaml-cpp copied to clipboard
Weffc++ broken for gcc 8 and intel compilers
Since this option is a known bug in these compilers, I think it would be worth while to turn if off when they are active.
"this option is a known bug" - In order to document it, can you link to the bug in bugzilla?
It looks like I was wrong, it is only a known issue in GCC.
I am not surprised Intel doesn't know about the bug, that seems like their mo..., but it basically interprets header guards with numbers in them as if they are defining globals constants. Personally, the IDE generated header guard should probably just be a #pragma once, and maybe that is the fix for this. If you have access to the Intel 2019 compiler you can generate the false positive yourself. Otherwise I can attach it here Monday.
GCC issue https://bugzilla.redhat.com/show_bug.cgi?id=1544675
GCC issue https://bugzilla.redhat.com/show_bug.cgi?id=1544675
Aha, that old thingy again. I referred to it in 0d5c57150cebb430fcc216d8066dbb28aeaafe8e when I added -Wshadow -Weffc++ -pedantic -pedantic-errors. :-)
I added some logic to turn these off in the CMake for the affected compilers.
I think it is worth disabling these for these compilers until there is good enough support for these options to compile without tons of false positives. Agree/disagree?
Also, after some more testing, I found that the latest GCC still has this issue.