Click on image to see enlargment
Will is preparing a 4th of July barbeque and is employing his new found programming skills to help prepare the menu. However, the value printed indicates that the meat eaters will be served a hummus sandwich. What's going on?
bug504.c lint Output
--- Module: bug504.c (C) _ return (Grand_Menu >> !v ? 8 : 0) & 0xFF; bug504.c(9) : Warning 504: Unusual shift operation (unusually formed right argument) bug504.c(9) : Warning 514: Unusual use of a Boolean expression --- Wrap-up for Module: bug504.c Info 750: local macro 'Hot_Dog' (line 2, file bug504.c) not referenced Info 750: local macro 'Potato_Salad' (line 3, file bug504.c) not referenced Info 750: local macro 'Green_Salad' (line 4, file bug504.c) not referenced Info 750: local macro 'Hummus_Sandwich' (line 5, file bug504.c) not referenced
Reference Manual Explanation
504 Unusual shift operation (String) -- Either the quantity being shifted or the amount by which a quantity is to be shifted was derived in an unusual way such as with a bit-wise logical operator, a negation, or with an unparenthesized expression. If the shift value is a compound expression that is not parenthesized, parenthesize it.
If you have comments or questions about this bug, please post them to our Discussion Forum
Previous Bug - Bug #553 - June 2008