From tlumley at u.washington.edu  Mon Aug 29 16:37:08 2005
From: tlumley at u.washington.edu (Thomas Lumley)
Date: Mon, 29 Aug 2005 07:37:08 -0700 (PDT)
Subject: [Rd] Compile warning in unique.c
In-Reply-To: <75DDD376F2B6B546B722398AC161106C1384922B@nihexchange2.nih.gov>
References: <75DDD376F2B6B546B722398AC161106C1384922B@nihexchange2.nih.gov>
Message-ID: <Pine.A41.4.61b.0508290733180.156102@homer05.u.washington.edu>

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



[Rd] Compile warning in unique.c
Thomas Lumley