benedictpaten / sonLib

Small general purpose library for C and Python with focus on bioinformatics.
MIT License
29 stars 25 forks source link

compile error in sonLibList #4

Open jts opened 13 years ago

jts commented 13 years ago

Hi,

I am trying to install sonList on a Debian system. The compile fails with the following error:

gcc -std=c99 -O3 -g -Wall -Werror --pedantic -funroll-loops -lm      -I inc -I ../lib/ -c impl/*.c
cc1: warnings being treated as errors
impl/sonLibList.c: In function ‘stList_peek’:
impl/sonLibList.c:87: error: assuming signed overflow does not occur when assuming that (X - c) >= X is always false

If I change -O3 to -O2 the problem does not occur.

Here is my GCC information:

> gcc -v
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.3.2-1.1' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --enable-cld --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.3.2 (Debian 4.3.2-1.1)
benedictpaten commented 13 years ago

This seems related to:

http://patrakov.blogspot.com/2008_10_01_archive.html

which is described in:

http://www.derkeiler.com/Mailing-Lists/Full-Disclosure/2007-01/msg00281.html

Not sure how to fix it, as we use such asserts frequently.