Dagobert Michelsen wrote:
The code in zcat
str.insert( 0U, 1, '1' );

matches the first declaration (0U is a position in str),

for 32 bit this is correct, however on 64 bit the type is 0UL which causes the
ambiguity. When I change the type to 0UL it works for 64 bit, but not 32 bit.
What is needed is a type that works on both 32 and 64 bit.

I have just tried on a 64 bit Slackware with gcc 4.5.2 and both 0U and 0 alone work perfectly without a warning, even with --pedantic.

Moreover, in zdiff.cc line 127 you can find
  do { fifonames[i].insert( pos, 1, codes[n % num_codes] );

where 'pos' is an unsigned int. I guess it can be considered a bug in the compiler to promote 'pos' to size_type and fail to do the same with 0 or 0U.

Best regards,

Zutils-bug mailing list

Reply via email to