[cfe-dev] Got compile error 'comparison between non-overlapping address spaces' on 3.6 branch

Song, Ruiling ruiling.song at intel.com
Thu Feb 12 21:55:54 PST 2015


Hi Sameer, Anastasia,

Do you have any comment on this? Thanks!

Ruiling
> -----Original Message-----
> From: Song, Ruiling
> Sent: Wednesday, February 11, 2015 10:38 AM
> To: 'cfe-dev at cs.uiuc.edu'
> Subject: Got compile error 'comparison between non-overlapping address
> spaces' on 3.6 branch
> 
> I am a developer working on Beignet (OpenCL driver for Intel Graphics card).
> I am trying Clang 3.6 branch, and encounter below problem. It works well in
> older clang version.
> We define NULL as "#define NULL (void *)0", so user could directly use it in
> OpenCL language like __kernel void test(__global unsigned int *dst)
> 	if (dst != NULL) {do something;}
> }
> But I got below error when compiling using clang 3.6.
> "error: comparison between  ('__global unsigned int *' and 'void *') which
> are pointers to non-overlapping address spaces"
> 
> Is this the expected behavior or a bug?
> 
> Thanks!
> Ruiling





More information about the cfe-dev mailing list