gcc/g++ is not type casting in if()- Problem

#include<stdio.h>
int main()
{
double a=2.1;
float b=2.1;
if(a==b)
printf("hh");
return 0;
}

Why is program not going in the if condition?
I tried this with gcc and g++ compiler of CYGWIN. Both show the same result.
Topic archived. No new replies allowed.