[Issue 10905] [ICE](ctfeexpr.c line 355) with ulong2 in structs

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Dec 10 04:53:53 PST 2013


https://d.puremagic.com/issues/show_bug.cgi?id=10905



--- Comment #10 from bearophile_hugs at eml.cc 2013-12-10 04:53:50 PST ---
(In reply to comment #9)
> One thing to note is that the result of a vector == comparison would not be a
> boolean.
> 
> import core.simd;
> 
> int4 a = [1,2,3,4];
> int4 b = [3,2,1,4];
> 
> if (a == b) { } // Error: vector comparison returning a boolean.
> 
> int4 c = (a == b);
> assert(c.array = [0, -1, 0, -1]);

That seems acceptable. But Manu is much more expert than me on such matters, so
we should listen to his opinion on this.

A possible semantics for:

if (a == b) {} else {}

Is to run the first branch if all items are equal ([-1, -1, -1, -1]) and the
second branch otherwise. I am not sure but I think some kind of Intel compiler
works like this.

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


More information about the Digitalmars-d-bugs mailing list