CUDA toolkit 2.3 float comparison

How does CUDA 2.3 compare floats?

I have a program written in CUDA-C that compiles without warnings with NVCC 2.2. I recently upgraded to NVCC 2.3 and now (after fixing some other things) get “warning : Double is not supported. Demoting to float” when I compile. I have narrowed down the source of the warning to two sections:

float a = ...;// Some function that returns a float

if (a <= 0.0f) { // Commenting out this line moves the warning to a different line
float * u = ...;// Some function that returns a pointer to float

if (*u < a) { // Also commenting out this line gets rid of the warning

Is NVCC 2.3 promoting the two floats to doubles to do the comparison? I am wanting to stick to using floats throughout my program so how to I get rid of the warnings?

Maybe try compiling it with -arch sm_12 flag? The only thing that 1.3 architecture introduces is the double-precission capability, with 1.2 you are limited - by definition - to floats, so nothing will be ever promoted to doubles.
Of course, this won’t work in the future, when they introduce new hardware, but for now - this is a walkaround which will hopefully help you.