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

Song, Ruiling ruiling.song at intel.com
Tue Feb 10 18:38:28 PST 2015


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