[Issue 3918] Parameter use before its use in an AndAnd expression with reals treats NaN as false

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Mar 15 21:07:27 PDT 2010


http://d.puremagic.com/issues/show_bug.cgi?id=3918


Don <clugdbug at yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |clugdbug at yahoo.com.au


--- Comment #1 from Don <clugdbug at yahoo.com.au> 2010-03-15 21:07:26 PDT ---
>NaN is supposed to be treated as true when implicitly converted to bool,
because it's not the same as zero.

That's surprising behaviour, I'd have expected that it needs to a non-zero
value.

I don't think implicit conversion float->bool should be legal at all, for
exactly this reason. But obviously its behaviour should be unaffected by -O.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list