In a fairly large code base, I found the following construct (rewritten snippet) in a cpp file
int main()
{
bool b;
b = "False"
}
This is a fully legal code, but clearly not intentional. It is easily fixed, but it has been present since 2014, and no one notices it, so it is clearly not easy to detect.
Can gcc be a warning about this?
source
share