+2005-01-26 Paolo Carlini <pcarlini@suse.de>
+
+ * acinclude.m4 ([GLIBCXX_ENABLE_C99]): Add ac_c99_complex
+ to the final test for enable_c99, thus robustifying it; remove
+ duplicate final test on ac_99_math.
+ * configure: Regenerate.
+
+ * include/std/std_complex.h: Remove usages of the dead
+ _GLIBCXX_BUGGY_COMPLEX macro.
+
+ * testsuite/26_numerics/cmath/19322.cc: Protect with
+ _GLIBCXX_USE_C99_MATH instead of the stronger _GLIBCXX_USE_C99,
+ since only C99 math facilities are involved.
+ * testsuite/26_numerics/cmath/c99_classification_macros_c++.cc:
+ Likewise.
+
2005-01-25 Loren J. Rittle <ljrittle@acm.org>
* acinclude.m4 (GLIBCXX_ENABLE_CLOCALE): Map FreeBSD to darwin
AC_DEFINE(_GLIBCXX_USE_C99_MATH)
fi
- # Check for the existence of <math.h> complex functions.
+ # Check for the existence of <complex.h> complex functions.
# This is necessary even though libstdc++ uses the builtin versions
# of these functions, because if the builtin cannot be used, a reference
# to the library function is emitted.
AC_MSG_CHECKING([for enabled ISO C99 support])
if test x"$ac_c99_math" = x"no" ||
+ test x"$ac_c99_complex" = x"no" ||
test x"$ac_c99_stdio" = x"no" ||
test x"$ac_c99_stdlib" = x"no" ||
test x"$ac_c99_wchar" = x"no"; then
fi;
AC_MSG_RESULT($enable_c99)
- if test x"$ac_99_math" = x"yes"; then
- AC_DEFINE(_GLIBCXX_USE_C99_MATH)
- fi
-
# Option parsed, now set things appropriately
if test x"$enable_c99" = x"yes"; then
AC_DEFINE(_GLIBCXX_USE_C99)
fi
- # Check for the existence of <math.h> complex functions.
+ # Check for the existence of <complex.h> complex functions.
# This is necessary even though libstdc++ uses the builtin versions
# of these functions, because if the builtin cannot be used, a reference
# to the library function is emitted.
echo "$as_me:$LINENO: checking for enabled ISO C99 support" >&5
echo $ECHO_N "checking for enabled ISO C99 support... $ECHO_C" >&6
if test x"$ac_c99_math" = x"no" ||
+ test x"$ac_c99_complex" = x"no" ||
test x"$ac_c99_stdio" = x"no" ||
test x"$ac_c99_stdlib" = x"no" ||
test x"$ac_c99_wchar" = x"no"; then
echo "$as_me:$LINENO: result: $enable_c99" >&5
echo "${ECHO_T}$enable_c99" >&6
- if test x"$ac_99_math" = x"yes"; then
- cat >>confdefs.h <<\_ACEOF
-#define _GLIBCXX_USE_C99_MATH 1
-_ACEOF
-
- fi
-
# Option parsed, now set things appropriately
if test x"$enable_c99" = x"yes"; then
cat >>confdefs.h <<\_ACEOF
complex(_ComplexT __z) : _M_value(__z) { }
complex(float = 0.0f, float = 0.0f);
-#if _GLIBCXX_BUGGY_COMPLEX
- complex(const complex& __z) : _M_value(__z._M_value) { }
-#endif
+
explicit complex(const complex<double>&);
explicit complex(const complex<long double>&);
complex(_ComplexT __z) : _M_value(__z) { }
- complex(double = 0.0, double = 0.0);
-#if _GLIBCXX_BUGGY_COMPLEX
- complex(const complex& __z) : _M_value(__z._M_value) { }
-#endif
+ complex(double = 0.0, double = 0.0);
+
complex(const complex<float>&);
explicit complex(const complex<long double>&);
complex(_ComplexT __z) : _M_value(__z) { }
complex(long double = 0.0L, long double = 0.0L);
-#if _GLIBCXX_BUGGY_COMPLEX
- complex(const complex& __z) : _M_value(__z._M_value) { }
-#endif
+
complex(const complex<float>&);
complex(const complex<double>&);
#include <cmath>
#include <testsuite_hooks.h>
-#if _GLIBCXX_USE_C99
+#if _GLIBCXX_USE_C99_MATH
// libstdc++/19322
void test01()
{
int main()
{
-#if _GLIBCXX_USE_C99
+#if _GLIBCXX_USE_C99_MATH
test01();
#endif
return 0;
void isunordered() { }
-#if _GLIBCXX_USE_C99
+#if _GLIBCXX_USE_C99_MATH
template <typename _Tp>
void test_c99_classify()
{
int main()
{
-#if _GLIBCXX_USE_C99
+#if _GLIBCXX_USE_C99_MATH
test_c99_classify<float>();
test_c99_classify<double>();
#endif