OpenMP vs. <math.h>
Andy Koppe
andy.koppe@gmail.com
Tue Jan 12 21:33:00 GMT 2010
2010/1/12 Yaakov (Cygwin/X)
> But thinking about this further, there's just no way that these macros would ever be safe with C++.
Yep, and the C++98 standard actually outlaws them, in §17.4.1.2 :
Names that are defined as functions in C shall be defined as functions
in the C++ Standard Library.*
[Footnote: This disallows the practice, allowed in C, of providing
a "masking macro" in addition to the function prototype. The only way
to achieve equivalent "inline" behavior in C++ is to provide a
definition as an extern inline function. --- end foonote]
- Andy
More information about the Newlib
mailing list