[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: "or" shortcut does not work - but why?
- From: Nick Gammon <nick@...>
- Date: Tue, 19 Jun 2007 07:14:57 +1000
On 19/06/2007, at 6:15 AM, Andreas Rozek wrote:
Unfortunately, this may mean that I'll have to change every in-
equality test in every Lua source and header file :-(
Can you reproduce that in a small test program?
Sounds like a compiler upgrade is needed.
I would have thought that for any C compiler that:
if (1 != 1) --> do something
would be equivalent to
if (! (1 == 1)) --> do something
Your displays seem to indicate that both of the elements in the if
are 1. Unless one is a floating point 1, and one an integer 1, or
something extremely bizarre like that. Even then, I can't see why the
'if' would behave like that.
I would look at the generated assembler code.