In Oracle Solaris Studio 12.4 and earlier releases of the compilers, the <sunmath.h> header file included C/C++ prototypes for "wrapper" functions intended to be called from Fortran to invoke many of the nonstandard math functions and floating-point utility routines in libsunmath. These "wrapper" functions themselves simply call corresponding functions that can be called from C/C++ directly, so there is no need for a C/C++ program to use them. For example, the "wrapper" function r_atan2d_ is equivalent to the C function atan2df.
In Oracle Developer Studio 12.5 , the "wrapper" functions are deprecated. Their prototypes in <sunmath.h> are now guarded by the preprocessor macro __SUNMATH_DEPRECATED; using these functions in a C program produces a warning:
example% cat func.c #include <sunmath.h> float func(float x, float y) { return r_atan2d_(&x, &y); } example% cc -c func.c "func.c", line 4: warning: implicit function declaration: r_atan2d_ example%
The resulting program will likely produce incorrect results. Such a program should be rewritten to use the corresponding C function directly:
return atan2df(x, y);
Alternatively, you can add#define __SUNMATH_DEPRECATED prior to the inclusion of <sunmath.h> or add -D__SUNMATH_DEPRECATED to the compiler flags specified on the command line, but note that the "wrapper" functions might be removed altogether in a future release.