This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
RE: OpenMP vs. <math.h>
- From: "Schwarz, Konrad" <konrad dot schwarz at siemens dot com>
- To: Jeff Johnston <jjohnstn at redhat dot com>, "Yaakov (Cygwin/X)" <yselkowitz at users dot sourceforge dot net>
- Cc: "newlib at sources dot redhat dot com" <newlib at sources dot redhat dot com>
- Date: Tue, 12 Jan 2010 08:41:41 +0100
- Subject: RE: OpenMP vs. <math.h>
- References: <4B477C9B.1080809@users.sourceforge.net> <4B4BACAF.1080506@redhat.com>
> > 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?