[Martin Michlmayr]

Your package fails to build with GCC 4.3.  Version 4.3 has not been
released yet but I'm building with a snapshot in order to find errors
and give people an advance warning.

You can reproduce this problem with gcc-4.3 or gcc-snapshot from
unstable.

Automatic build of recode_3.6-14 on em64t by sbuild/amd64 0.53
...
gcc -DLIBDIR=\"/usr/lib\" -DHAVE_CONFIG_H -I.. -I. -I../lib -I../libiconv -g 
-Wall -D_REENTRANT -O2 -c charname.c  -fPIC -DPIC -o .libs/charname.lo
In file included from common.h:140,
                 from charname.c:20:
recodext.h:221: error: width of 'ignore' exceeds its type
make[3]: *** [charname.lo] Error 1

Remove the bit-field and it will work.

Hi, Martin, Debian people, and Recode pre-testers.

This should be corrected for the next release of Recode.  Thanks!

Instead of removing the bit-field, I reduced it from 2 to 1, as there are other bool fields having 1 as a bit field in the same file, and this does not apparently generate recent problems from other testers.

But I'm pretty sure that if I once used 2 instead of 1, it came from the fact, when bool is not available and rather made an enum of 0 and 1, that some compiler (I do not remember which) saw 0 and 1 as signed integers (while I was thinking of those two constants as unsigned), and complained that 1 as a bit field was too small, not having enough room for the sign bit any integer should have. I do remember I was not happy being forced to use 2 bits for holding a boolean.

While it is true that the bit field could be made smaller, and more tight for the value it receives, I'm rather surprised to see that this will be an error in some incoming GNU C compiler. A warning, I would easily understand. But an error? Does it mean that the programmer is about to loose, with this incoming compiler, the freedom of deciding the precise bit allocation of his fields? It looks pretty wrong to me. What is the rationale?

--
François Pinard   http://pinard.progiciels-bpi.ca


Reply via email to