From 3b424b30be6a93cfc68df6f77e0aa1ce673d71fe Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Mon, 11 Feb 2013 10:30:43 +0000 Subject: [PATCH] re PR libstdc++/56282 (std::basic_ios broken with -std=c++11 (undefined reference)) 2013-02-11 Paolo Carlini PR libstdc++/56282 Revert: 2013-02-06 Edward Smith-Rowland <3dw4rd@verizon.net> PR libstdc++/56193 * include/bits/basic_ios.h: Replace operator void*() const with explicit operator bool() const in C++11 and greater. * testsuite/27_io/basic_ios/pr56193.cc: New file. From-SVN: r195939 --- libstdc++-v3/ChangeLog | 35 ++++++++++++------- libstdc++-v3/include/bits/basic_ios.h | 5 --- .../testsuite/27_io/basic_ios/pr56193.cc | 31 ---------------- 3 files changed, 23 insertions(+), 48 deletions(-) delete mode 100644 libstdc++-v3/testsuite/27_io/basic_ios/pr56193.cc diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 32b391ee475..1768b9b45be 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,14 @@ +2013-02-11 Paolo Carlini + + PR libstdc++/56282 + Revert: + 2013-02-06 Edward Smith-Rowland <3dw4rd@verizon.net> + + PR libstdc++/56193 + * include/bits/basic_ios.h: Replace operator void*() const + with explicit operator bool() const in C++11 and greater. + * testsuite/27_io/basic_ios/pr56193.cc: New file. + 2013-02-10 François Dumont Jonathan Wakely @@ -30,20 +41,20 @@ PR libstdc++/56216 * include/tr1/special_function_util.h: Remove spurious const from numeric arguments. - * include/tr1/riemann_zeta.tcc: Ditto. - * include/tr1/exp_integral.tcc: Ditto. - * include/tr1/bessel_function.tcc: Ditto. - * include/tr1/hypergeometric.tcc: Ditto. - * include/tr1/modified_bessel_func.tcc: Ditto. - * include/tr1/poly_laguerre.tcc: Ditto. - * include/tr1/gamma.tcc: Ditto. - * include/tr1/legendre_function.tcc: Ditto. - * include/tr1/poly_hermite.tcc: Ditto. - * include/tr1/ell_integral.tcc: Ditto. + * include/tr1/riemann_zeta.tcc: Likewise. + * include/tr1/exp_integral.tcc: Likewise. + * include/tr1/bessel_function.tcc: Likewise. + * include/tr1/hypergeometric.tcc: Likewise. + * include/tr1/modified_bessel_func.tcc: Likewise. + * include/tr1/poly_laguerre.tcc: Likewise. + * include/tr1/gamma.tcc: Likewise. + * include/tr1/legendre_function.tcc: Likewise. + * include/tr1/poly_hermite.tcc: Likewise. + * include/tr1/ell_integral.tcc: Likewise. * include/tr1/bessel_function.tcc (__cyl_bessel_ij_series): If argument is zero return function value. - * testsuite/tr1/5_numerical_facilities/special_functions/08_cyl_bessel_i/pr56216.cc: - New file. + * testsuite/tr1/5_numerical_facilities/special_functions/ + 08_cyl_bessel_i/pr56216.cc: New. 2013-02-07 Paolo Carlini diff --git a/libstdc++-v3/include/bits/basic_ios.h b/libstdc++-v3/include/bits/basic_ios.h index bda40f0a7a3..b78b464ba02 100644 --- a/libstdc++-v3/include/bits/basic_ios.h +++ b/libstdc++-v3/include/bits/basic_ios.h @@ -112,13 +112,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * This allows you to write constructs such as * if (!a_stream) ... and while (a_stream) ... */ -#if __cplusplus >= 201103L - explicit operator bool() const - { return !this->fail(); } -#else operator void*() const { return this->fail() ? 0 : const_cast(this); } -#endif bool operator!() const diff --git a/libstdc++-v3/testsuite/27_io/basic_ios/pr56193.cc b/libstdc++-v3/testsuite/27_io/basic_ios/pr56193.cc deleted file mode 100644 index 79793e26756..00000000000 --- a/libstdc++-v3/testsuite/27_io/basic_ios/pr56193.cc +++ /dev/null @@ -1,31 +0,0 @@ -// { dg-do compile } -// { dg-options "-std=gnu++11" } - -// 2013-02-06 Edward Smith-Rowland <3dw4rd@verizon.net> -// -// Copyright (C) 2013 Free Software Foundation, Inc. -// -// This file is part of the GNU ISO C++ Library. This library is free -// software; you can redistribute it and/or modify it under the -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 3, or (at your option) -// any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING3. If not see -// . - -#include - -// PR libstdc++/56193 -void -test01() -{ - std::cout << std::cout; // { dg-error "cannot bind" } -} -// { dg-error "initializing argument" "" { target *-*-* } 602 } -- 2.30.2