[vlc-devel] [PATCH 17/22] vlc_arrays: DictHash output is always used as an int
filcab at filcab.net
Sun Aug 2 21:24:54 CEST 2015
On Sunday, August 2, 2015, Rémi Denis-Courmont <remi at remlab.net> wrote:
> Le dimanche 02 août 2015, 12:07:49 Filipe Cabecinhas a écrit :
> > >> Not losing precision.
> > >
> > > What the heck does that even mean? Neither converting implicitly nor
> > > casting explicitly to int (or any other signed type) can lose
> > How are you not losing precision? You had a 64-bit integer and are
> > the bottom 32 bits.
> Of course not. Conversion from an integer type to a *signed* integer type
> always exact in C. The number of bits of both types is irrelevant.
It's implementation dependent but exact, yes. What I'm saying is that int
might be 32 bits and you might only get the bottom 32 bits of the uint64_t
you had. I'm not saying you could get different results from the same input
or anything similar. Just that you're discarding some bits if int is 32
> Rémi Denis-Courmont
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the vlc-devel