[cfe-commits] [PATCH] Generic_GCC::GCCVersion comparison fix
satanasyan at mips.com
Wed Dec 12 03:32:33 PST 2012
It looks like comparison operators in the "Generic_GCC::GCCVersion"
class work incorrectly if we want to compare equal versions without
The problem is in the following line of code:
if (RHS.Patch == -1) return true; if (Patch == -1) return false;
Suppose we have two GCCVersion objects A and B both represent say 4.7.
In that case A < B is true as well as B < A because right operand has
no patch number in both cases. Consequently A <= B and B <= A are both
Is this intended behavior? If not, please review the patch fixes this
problem. Unfortunately I cannot figure out how to write a test for
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 754 bytes
Desc: not available
More information about the cfe-commits