OpenMP vs. <math.h>
Schwarz, Konrad
konrad.schwarz@siemens.com
Tue Jan 12 07:40:00 GMT 2010
> > 2010-01-08 Yaakov Selkowitz<yselkowitz@users.sourceforge.net>
> >
> > * libc/include/math.h (log2, log2f): Disable macro
> versions for C++,
> > as they are incompatible with OpenMP/C++ headers.
> >
>
> Patch applied. I am going to talk to the C++ folks to see if
> they have
> any additional thoughts.
Both C and C++ allow the library to use macros (e.g., C++ 1999:
Each identifier with file scope [e.g., log2] listed in any of the following subclauses [which describe the header files of the standard library] (including the
future library directions) is reserved for use as a macro name and as an identifier with
file scope in the same name space if any of its associated headers [e.g., math.h] is included.
[...]
Any function declared in a header may be additionally implemented as a function-like macro defined in the header [...]
So it would seem that the fault lies with OpenMP?
More information about the Newlib
mailing list