[minor bug] macro conflict for M_PI_2 and M_SQRT1_2 with math.h

When using the _USE_MATH_DEFINES preprocessor definition, the
#define M_SQRT1_2 7.0710678118654752440E-1
#define M_PI_2 1.5707963267948966192E0
definitions in Standard_math.hxx are conflicting with the same ones from math.h

Could you please enclose the definitions in Standard_math.hxx with #ifndef / #endif ?

#ifndef M_SQRT1_2
#define M_SQRT1_2 7.0710678118654752440E-1
#endif

#ifndef M_PI_2
#define M_PI_2 1.5707963267948966192E0
#endif

Thanks,

Stephane

Forum supervisor's picture

Hello Stephane,

Thank you for noticing and reporting this problem. It is now registered as the bug OCC18387 "Macro conflict for M_PI_2 and M_SQRT1_2 with math.h". We shall try to fix the problem as soon as we have such possibility. As soon as we the fix is ready we shall provide it in one of the next releases of Open CASCADE Technology - for the list of fixes please check the Release Notes at http://www.opencascade.org/getocc/whatsnew/.

Best regards,
Forum Supervisor

m-aronsson's picture

So if you are using the "free" version of OCC you have just helped them to fix a bug that will only be given to paying customers for now, you will not get it until the next "major" release, very logical.

Mauro Mariotti's picture

The bug is still open in my revision 6.5.1.
Does the fix give trouble?
Mauro

Andrey Betenev's picture

The fix is included in next release 6.5.3, see http://tracker.dev.opencascade.org/view.php?id=18387