This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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: 26_numerics/c99_classification_macros_c++.cc fails on cygwin


I have made a little more progress on this.
 - cygwin has full C99 support in <math.h>,
 - but not in <stdlib.h>.
so that _GLIBCPP_USE_C99 is not defined

This means that the libstdc++-v3/include/c_std/std_cmath.h
doesn't undefine the C99 FP macros.

Details below.  Where to from here?

   

On cygwin, libstdc++-v3 configure reports

...
checking for ISO C99 support in <math.h>... yes
checking for ISO C99 support in <stdio.h>... yes
checking for lldiv_t declaration... no
checking for ISO C99 support in <stdlib.h>... no
...

so that configure.h contains

...
// Define if C99 features such as lldiv_t, llabs, lldiv should be exposed.
/* #undef _GLIBCPP_USE_C99 */
...

In libstdc++-v3/include/c_std/std_cmath.h code to undefine the 
C99 macros is guarded by

#if _GLIBCPP_USE_C99
#if !_GLIBCPP_USE_C99_FP_MACROS_DYNAMIC

...

// Only undefine the C99 FP macros, if actually captured for namespace movement
#undef fpclassify

...
#endif /* _GLIBCPP_USE_C99_FP_MACROS_DYNAMIC */
#endif



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