On 24 Oct, 2011, at 1:33 PM, Marko Lindqvist wrote: > On 24 October 2011 22:20, Jason Dorje Short <jdo...@gmail.com> wrote: >> For the first time in some time, I have time for freeciv work. But on >> compiling, --enable-debug=checks (--enable-debug=yes in older >> branches) doesn't compile in trunk or in most branches anymore. >> >> One issue does seem to be in the GTK header files, both not under our >> control and commented in the headers as being deprecated in C99 but >> needed for backwards compatibility. That particular check (-W flag >> given to gcc) will have to be removed for it to compile. > > What distribution are you using? Are you using distribution's > versions of both gcc and gtk+ (one would assume that those are > compatible with each other)? I have no such problems with Debian > Wheezy; gcc 4.6.1, gtk2 2.24.6 > >> Another common issue is a seemingly new catch by the compiler of >> unused variables that are set but never used. Many of these are >> accidental but some happen in iterate loops where a variable is >> provided but not used within the loop. For this I propose a macro to >> mark the variable as unused, which will tell both the compiler and the >> reader what's going on. > > These are new with gcc 4.6. I have fixed most of them, and have > patches for many of the remaining ones. Your macro is probably > required for the remaining ones. > See bug #18217
Yeah, i need to file some bugs in this area too. Compilation fails when using clang [which is now default on OSX 10.7/XCode 4.2]: > > /bin/sh ../libtool --preserve-dup-deps --silent --tag=CC --mode=compile > gcc -DHAVE_CONFIG_H -I. -I.. -I/sw/include > -DLOCALEDIR="\"/sw/share/locale\"" -DBINDIR="\"/sw/bin\"" > -DDEFAULT_DATA_PATH="\".:data:~/.freeciv/2.3:/sw/share/freeciv\"" > -DDEFAULT_SAVES_PATH="\"\"" > -DDEFAULT_SCENARIO_PATH="\".:data/scenario:~/.freeciv/2.3/scenarios:~/.freeciv/scenarios:/sw/share/freeciv/scenario\"" > -Wall -Wpointer-arith -Wcast-align -Wmissing-prototypes > -Wmissing-declarations -Wno-unused-but-set-variable -Werror -g -O2 > -fsigned-char -c -o shared.lo shared.c > shared.c:370:36: error: comparison of unsigned expression >= 0 is always > true [-Werror,-Wtautological-compare] > while (mantissa != 0 && exponent >= 0) { > ~~~~~~~~ ^ ~ > /bin/sh ../libtool --preserve-dup-deps --silent --tag=CC --mode=compile > gcc -DHAVE_CONFIG_H -I. -I.. -I/sw/include > -DLOCALEDIR="\"/sw/share/locale\"" -DBINDIR="\"/sw/bin\"" > -DDEFAULT_DATA_PATH="\".:data:~/.freeciv/2.3:/sw/share/freeciv\"" > -DDEFAULT_SAVES_PATH="\"\"" > -DDEFAULT_SCENARIO_PATH="\".:data/scenario:~/.freeciv/2.3/scenarios:~/.freeciv/scenarios:/sw/share/freeciv/scenario\"" > -Wall -Wpointer-arith -Wcast-align -Wmissing-prototypes > -Wmissing-declarations -Wno-unused-but-set-variable -Werror -g -O2 > -fsigned-char -c -o md5.lo md5.c > md5.c:148:5: error: cast from 'const unsigned char *' to 'MD5_u32plus *' > (aka 'unsigned int *') increases required alignment from 1 to 4 > [-Werror,-Wcast-align] > STEP(F, a, b, c, d, SET(0), 0xd76aa478, 7) > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In the meantime i've set my package to use llvm, but enable-debug is problematic. A user reported that it "fails later with warnings registry.c". I don't have a specific error message, but will see what i can dig up. Sent from my MacBookPro Drink your coffee! There are poor people in India sleeping. _______________________________________________ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev