sizeof(int)replaced by a type std::size_tthat is unsigned for most implementations .
Comparison of the signed with the unsigned leads to a strange result due to the fact that the signed position is being promoted without sign.
You can get a reasonable result as shown below
if(static_cast<int>(sizeof(int)) >= -2)
If you work with a compiler C
if((int)sizeof(int) >= -2)
-Wall, , , , / . ( )