Re: [PATCH 3/3] grep: get rid of useless x < 0 comparison on an enum member
- From
Andreas Schwab <schwab@linux-m68k.org>
- Date
- Nov 7, 2011, 18:24 UTC
- Message-ID
- <m2k47b4wqi.fsf@igel.home>
- In-Reply-To
- <20111107163823.GB27055@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
> Yes, but now you are getting into implementation-defined behavior, which > is also something to avoid.
The whole point of the statement is a sanity check to uncover bugs. If you remove the first condition you completely ruin its point.
Andreas.
-- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."