This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: OpenMP vs. <math.h>


[ meant to reply last week, but dropped the ball. sorry. ]

Yaakov (Cygwin/X) wrote:
> POSIX allows for <math.h> functions to also be defined as macros.
> Currently, only log2 and log2f are so defined.
> 
> These macros pose problems with a few projects which define their own
> static/inline/template log2() 

> However, I just encountered tonight a much larger conflict: OpenMP/C++
> and <math.h> are incompatible.  

> As this would seem to affect all Newlib platforms, I think the most
> plausible solution is to make the log2 macros dependent on !__cplusplus.
>  Patch attached.

  Why is the solution to penalise all the correct and valid C++ code out there
instead of to fix the few buggy bits and pieces that don't conform to the
language standard?

    cheers,
      DaveK


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]