Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

RE: pws-19



>
> Please try --enable-lfs if you have a 32-bit system with large file
> support.
>

I get here quite a lot of warnings, that look like

glob.c  1261: [warning]:   CFE1859 result of small arithmetic used as wider
type
            r = b->_links - a->_links;
                ^

glob.c  1265: [warning]:   CFE1808 Cast of a large integral may lose bits
            return (int) ((*s & GS_DESC) ? -r : r);
                   ^

glob.c  2046: [warning]:   CFE1807 Conversion of a large integral may lose
bits
        int rstart = zstrtol(str+1,&dots,10), rend = 0, err = 0, rev = 0;
                     ^

(glob.c was just an example).

Some (many? all?) of them are probbaly harmless - this is the case, when the
value definitely fits in 32 bit. But still there are possible problems:

1. is there any chance, that some variables were not converted to 64 bit?
2. I already have seen weird side effects with casts between 32 and 64 bit
values. The problem is, signed/unsigned conversion between 32 bit values is
always harmless - it does not change bit pattern. Unfortunately, when
casting 32 bit value to 64 bit one, this becomes *very* important. That is,

unsigned i; long  j; i = (unsigned)j;

is noop, but

zulong i; long j; i = (unsigned)j;

does not sign extend - instead of small negative we get large positive
number.

I can post the messages here or send privately. Is anybody interested?

/andrej




Messages sorted by: Reverse Date, Date, Thread, Author