CVSROOT: /sources/gnash Module name: gnash Branch: release_0_8_1 Changes by: Sandro Santilli <strk> 07/08/22 15:45:01
Modified files: . : ChangeLog testsuite/misc-ming.all: DrawingApiTestRunner.cpp Log message: * testsuite/misc-ming.all/DrawingApiTestRunner.cpp: Try another work-around to gcc-4.1.2 bug, commented this time. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&only_with_tag=release_0_8_1&r1=1.3971.2.53&r2=1.3971.2.54 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/DrawingApiTestRunner.cpp?cvsroot=gnash&only_with_tag=release_0_8_1&r1=1.20.2.1&r2=1.20.2.2 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.3971.2.53 retrieving revision 1.3971.2.54 diff -u -b -r1.3971.2.53 -r1.3971.2.54 --- ChangeLog 22 Aug 2007 14:29:33 -0000 1.3971.2.53 +++ ChangeLog 22 Aug 2007 15:45:00 -0000 1.3971.2.54 @@ -1,5 +1,8 @@ 2007-08-22 Sandro Santilli <[EMAIL PROTECTED]> + * testsuite/misc-ming.all/DrawingApiTestRunner.cpp: + Try another work-around to gcc-4.1.2 bug, commented + this time. * testsuite/actionscript.all/MovieClip.as: Modify syntax used to test for functions availability to cope with a bug in Ming < 00040005. Index: testsuite/misc-ming.all/DrawingApiTestRunner.cpp =================================================================== RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/DrawingApiTestRunner.cpp,v retrieving revision 1.20.2.1 retrieving revision 1.20.2.2 diff -u -b -r1.20.2.1 -r1.20.2.2 --- testsuite/misc-ming.all/DrawingApiTestRunner.cpp 21 Aug 2007 15:10:03 -0000 1.20.2.1 +++ testsuite/misc-ming.all/DrawingApiTestRunner.cpp 22 Aug 2007 15:45:00 -0000 1.20.2.2 @@ -44,10 +44,26 @@ inscribedRect(int x, int y, int radius) { Range2d<int> ret; - float halfside = ((float)radius * sqrt(2.0f))/2.0f; - ret.expandTo(int(round(x-halfside)), int(round(y-halfside))); - ret.expandTo(int(round(x+halfside)), int(round(y+halfside))); - fprintf(stderr, "."); + + int side = int(round((float)radius * sqrt(2.0f))); + int halfside = int(side/2.0); // round toward zero + + // Simply constructing a stringstream fixes an optimization + // bug with GCC-4.1.2 resulting in absurd values ! + // See https://savannah.gnu.org/bugs/?20853 + std::stringstream work_around_GCC_412_bug; + + // upper-left corner + int ULx = x-halfside; + int ULy = y-halfside; + + // lower-right corner + int LRx = x+halfside; + int LRy = y+halfside; + + ret.expandTo(ULx, ULy); + ret.expandTo(LRx, LRy); + return ret; } _______________________________________________ Gnash-commit mailing list Gnash-commit@gnu.org http://lists.gnu.org/mailman/listinfo/gnash-commit