Exceptions caused by ambiguous overloads

Programming languages - C (ISO/IEC 9899:2003) introduced error messages for standard floating point and long double overloads of standard math functions.

As of z/OS® V1R2 C++ compiler, compiling the code in Figure 1 will produce the following error message:
CCN5219: The call to "pow" has no best match
To handle the exception, you could specify the LANGLVL(OLDMATH) option, which removes the float and long double overloads. If you don't want to remove the overloads, you can modify the code by casting the pow arguments.
Figure 1. Code modification to handle CCN5219 exception
    #include <math.h>
    int main()
    {
        float a = 137;
        float b;
        b = pow(a, 2.0);      1   
        return 0;
    }
Note: The call to pow has no best match. To fix the problem, cast 2.0 to be of type float:
    b = pow(a, (float)2.0);