Re: [Rd] Compile warning in unique.c

From: Thomas Lumley <tlumley_at_u.washington.edu>
Date: Mon 29 Aug 2005 - 14:37:08 GMT

On Mon, 29 Aug 2005, Harris, Michael (NIH/NCI) [E] wrote:
>
> I am getting a compile warning when building R from source. I am building
> on a AMD64 Opteron system with gcc (GCC) 3.3.3 (SuSE Linux)
>
> The warning is:
>
> unique.c: In function `cshash':
>
> unique.c:1146: warning: cast from pointer to integer of different size
>

The comment immediately above this suggests that it is deliberate

  /* Use hashing to improve object.size. Here we want equal CHARSXPs,

     not equal contents.  This only uses the bottom 32 bits of the pointer,
     but for now that's almost certainly OK */

The warning is presumably because casting this int back to a pointer would fail (and is a common 32 to 64bit conversion error), but that's not what is happening here.

         -thomas



R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Tue Aug 30 00:40:14 2005

This archive was generated by hypermail 2.1.8 : Mon 24 Oct 2005 - 22:27:46 GMT