Hi, I noticed that GEOS' ./configure scripts called with --enable-cassert=yes (GEOS equivalent of --enable-debug=yes) sets CFLAGS as follows:
CFLAGS = -g -O2 -Wall -ansi -pedantic -Wno-long-long As you see, this will produce debug version of optimized code. It is not forbidden, but according to GCC manual, it can produce some side and unexpected effects: http://gcc.gnu.org/onlinedocs/gcc-4.1.1/gcc/Debugging-Options.html#Debugging-Options "GCC allows you to use -g with -O. The shortcuts taken by optimized code may occasionally produce surprising results: some variables you declared may not exist at all; flow of control may briefly move where you did not expect it; some statements may not be executed because they compute constant results or their values were already at hand; some statements may execute in different places because they were moved out of loops." I'd suggest to remove -O2 option if --enable-cassert is passed to ./configure. What do you think? Cheers -- Mateusz Loskot http://mateusz.loskot.net _______________________________________________ geos-devel mailing list geos-devel@geos.refractions.net http://geos.refractions.net/mailman/listinfo/geos-devel