I don't think it's a floating point comparison problem.
I've inserted some additional printf statements:
if (force || pages->getLength() == 0 ||
(!continuousMode && topPageA != topPage) ||
zoomA != zoom || dpiA != dpi || rotateA != rotate) {
printf("delete cache\n");
printf("1: %s\n", (force)?"true":"false");
printf("2: %s\n", (pages->getLength() == 0)?"true":"false");
printf("3: %s\n", (!continuousMode && topPageA !=
topPage)?"true":"false");
printf("4: %s\n", (zoomA != zoom || dpiA != dpi || rotateA !=
rotate)?"true":"false");
...
}
and the output was:
delete cache
1: false
2: false
3: false
4: false
which is very contradictory.
If I omit the "delete cache" output, the zoom problem vanishes and no
output is given (the condition seems to be (correctly) evaluated to
"false").
If I put the printfs in front of the if-statement, the zoom problem
vanishes and the correct output (4x false) is given.
I doubt that some simple printfs should alter the program behavior in that
way. So, either there is some "undefined behavior" in there or the code
produced by g++-4.4 is wrong.
(tested with g++-4.4 (Debian 4.4.4-1) 4.4.4)
Michael
--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org