Click on image to see enlargment
This is just a small portion of a vast computer program being prepared by Santa and his elves. Unfortunately something is going wrong and even though Jane has been naughty, the poor are still "left with nothing". What's going wrong?
bug1563.cpp lint Output
--- Module: bug1563.cpp (C++) _ "New Bicycle"; bug1563.cpp(9) : Warning 1563: Suspicious third argument to ?: operator
Reference Manual Explanation
1563 Suspicious third argument to ?: operator -- The third argument to ?: contained an unparenthesized assignment operator such as p ? a : b = 1 If this is what was intended you should parenthesize the third argument as in: p ? a : (b = 1) Not only is the original form difficult to read but C, as opposed to C++, would parse this as: (p ? a : b) = 1
If you have comments or questions about this bug, please post them to our Discussion Forum
Previous Bug - Bug #456 - November 2010