Its not the problem with the pow but its just long size is not big enough to hold the data.

long iTemp = (long)pow(28,7);

This should avoid all the errors and warning but the out put is not correct because the actual output is 13492928512 which is more than 2^32.