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

2014-01-27 Thread sch...@linux-m68k.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59961 --- Comment #1 from Andreas Schwab sch...@linux-m68k.org --- -100 is not the same as -s1. The latter is SIZE_MAX + 1 - 100, a big number, depending on the size of size_t. If s1 is declared as unsigned short or unsigned char, it will be promoted

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

2014-01-27 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59961 Jakub Jelinek jakub at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED

[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;

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

2014-01-27 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59961 --- Comment #4 from Andrew Pinski pinskia at gcc dot gnu.org --- (In reply to Olaf from comment #3) Well... naive me found it quite surprising and unexpected that the following two lines produce grossly different results: double result1 =