Hi, when i compiling gnu parted 1.8.8 with gcc 4.5.0, got error include regex.i TIA ========================================================================= /bin/sh ../libtool --tag=CC --mode=compile gcc -std=gnu99 -I. -Os -Werror -MT regex.lo -MD -MP -MF .deps/regex.Tpo -c -o regex.lo regex.c gcc -std=gnu99 -I. -Os -Werror -MT regex.lo -MD -MP -MF .deps/regex.Tpo -c regex.c -fPIC -DPIC -o .libs/regex.o cc1: warnings being treated as errors In file included from regex.c:58: regex_internal.h:185: error: integer overflow in preprocessor expression make[2]: *** [regex.lo] Error 1 make[2]: Leaving directory `/home/user/d/parted-1.8.8/lib' make[1]: *** [all] Error 2 make[1]: Leaving directory `/home/user/d/parted-1.8.8/lib' make: *** [all-recursive] Error 1 bash-4.0$ cc -v Using built-in specs. Target: x86_64-unknown-linux-gnu Configured with: ../gcc/configure --prefix=/usr --libexecdir=/usr/lib --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-languages=c,c++ --disable-bootstrap --disable-multilib Thread model: posix gcc version 4.5.0 20090503 (experimental) (GCC) bash-4.0$
Created attachment 17795 [details] .i file
Works for me.
Not surprisingly when the error is during preprocessing. regex.h parted ships (why?) is broken by the #elif changes, there is: #if some_condition_that_is_true_on_sane_targets ... #elif BITSET_WORD_MAX == (0xffffffff + 2) * 0xffffffff /* Work around a bug in 64-bit PGC (before version 6.1-2), where the preprocessor mishandles large unsigned values as if they were signed. */ ... #endif To make GCC happy about this at least the #elif should be changed into #else #if ... #endif.