Is there any way to force compiler to get warning on such code:
double func(double a,double b)
{
double c=a/b;
return c;
}
but not on this one:
double func(double a,double b)
{
if(b==0)
return 0;
double c=a/b;
return c;
}
Something like:
warning: b might be zero in division line ...
I want the compiler forces me to check division by zero in my code.