[Bug c/59961] New: Use of size_t in leading term of computation with subtraction

2014-01-27 Thread olaf at robots dot ox.ac.uk
Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: olaf at robots dot ox.ac.uk The minimalistic example further down produces a very unexpected result and no warnings at all. I understand that size_t s1 can not be negative. However, in my

[Bug c/59961] Use of size_t in leading term of computation with subtraction

2014-01-27 Thread olaf at robots dot ox.ac.uk
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59961 --- Comment #3 from Olaf olaf at robots dot ox.ac.uk --- Well... naive me found it quite surprising and unexpected that the following two lines produce grossly different results: double result1 = -s1*d1 + s2*d2; double result2 = s2*d2 - s1*d1