diff options
author | Paolo Carlini <pcarlini@suse.de> | 2005-01-26 10:34:53 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2005-01-26 10:34:53 +0000 |
commit | 02a65d230fc24a23a5c74483bc6de7dcd24b4e80 (patch) | |
tree | 8649195ff92300ce4f1438e8b0637e1bc93132c4 | |
parent | 97bd954f1c5c2e26f5a429bab411e510b3f2ad39 (diff) | |
download | gcc-02a65d230fc24a23a5c74483bc6de7dcd24b4e80.zip gcc-02a65d230fc24a23a5c74483bc6de7dcd24b4e80.tar.gz gcc-02a65d230fc24a23a5c74483bc6de7dcd24b4e80.tar.bz2 |
acinclude.m4 ([GLIBCXX_ENABLE_C99]): Add ac_c99_complex to the final test for enable_c99, thus robustifying it...
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.
From-SVN: r94257
-rw-r--r-- | libstdc++-v3/ChangeLog | 16 | ||||
-rw-r--r-- | libstdc++-v3/acinclude.m4 | 7 | ||||
-rwxr-xr-x | libstdc++-v3/configure | 10 | ||||
-rw-r--r-- | libstdc++-v3/include/std/std_complex.h | 14 | ||||
-rw-r--r-- | libstdc++-v3/testsuite/26_numerics/cmath/19322.cc | 4 | ||||
-rw-r--r-- | libstdc++-v3/testsuite/26_numerics/cmath/c99_classification_macros_c++.cc | 4 |
6 files changed, 28 insertions, 27 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index c8de690..d362f20 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,19 @@ +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 diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4 index d7442f1..f18b7d9 100644 --- a/libstdc++-v3/acinclude.m4 +++ b/libstdc++-v3/acinclude.m4 @@ -871,7 +871,7 @@ AC_DEFUN([GLIBCXX_ENABLE_C99], [ 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. @@ -1055,6 +1055,7 @@ AC_DEFUN([GLIBCXX_ENABLE_C99], [ 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 @@ -1062,10 +1063,6 @@ AC_DEFUN([GLIBCXX_ENABLE_C99], [ 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) diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure index 365e2fd..8b7b493 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -6948,7 +6948,7 @@ _ACEOF 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. @@ -9369,6 +9369,7 @@ echo "${ECHO_T}$ac_c99_wchar" >&6 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 @@ -9377,13 +9378,6 @@ echo $ECHO_N "checking for enabled ISO C99 support... $ECHO_C" >&6 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 diff --git a/libstdc++-v3/include/std/std_complex.h b/libstdc++-v3/include/std/std_complex.h index da322ab..2ef5817 100644 --- a/libstdc++-v3/include/std/std_complex.h +++ b/libstdc++-v3/include/std/std_complex.h @@ -995,9 +995,7 @@ namespace std 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>&); @@ -1150,10 +1148,8 @@ namespace std 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>&); @@ -1306,9 +1302,7 @@ namespace std 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>&); diff --git a/libstdc++-v3/testsuite/26_numerics/cmath/19322.cc b/libstdc++-v3/testsuite/26_numerics/cmath/19322.cc index 1057114..ca6fdaa 100644 --- a/libstdc++-v3/testsuite/26_numerics/cmath/19322.cc +++ b/libstdc++-v3/testsuite/26_numerics/cmath/19322.cc @@ -28,7 +28,7 @@ #include <cmath> #include <testsuite_hooks.h> -#if _GLIBCXX_USE_C99 +#if _GLIBCXX_USE_C99_MATH // libstdc++/19322 void test01() { @@ -40,7 +40,7 @@ void test01() int main() { -#if _GLIBCXX_USE_C99 +#if _GLIBCXX_USE_C99_MATH test01(); #endif return 0; diff --git a/libstdc++-v3/testsuite/26_numerics/cmath/c99_classification_macros_c++.cc b/libstdc++-v3/testsuite/26_numerics/cmath/c99_classification_macros_c++.cc index 815a73e..28dd940 100644 --- a/libstdc++-v3/testsuite/26_numerics/cmath/c99_classification_macros_c++.cc +++ b/libstdc++-v3/testsuite/26_numerics/cmath/c99_classification_macros_c++.cc @@ -55,7 +55,7 @@ void islessgreater() { } void isunordered() { } -#if _GLIBCXX_USE_C99 +#if _GLIBCXX_USE_C99_MATH template <typename _Tp> void test_c99_classify() { @@ -83,7 +83,7 @@ template <typename _Tp> int main() { -#if _GLIBCXX_USE_C99 +#if _GLIBCXX_USE_C99_MATH test_c99_classify<float>(); test_c99_classify<double>(); #endif |