mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-25 20:30:11 +08:00
49bc23b7f9
2002-08-02 Benjamin Kosnik <bkoz@redhat.com> Revert PR libstdc++/6594 * src/strstream.cc (strstreambuf): Revert. (strstreambuf::overflow): Same. (strstreambuf::~strstreambuf): Same. * testsuite/backward/strstream_members.cc (test02): Add. * docs/html/abi.txt: Update. Spell check. * testsuite/19_diagnostics/stdexceptions.cc (test04): Add bool test. * testsuite/Makefile.am (INCLUDES): Add LIBSUPCXX_INCLUDES. * testsuite/Makefile.in: Regenerate. * testsuite/testsuite_hooks.h: Use __throw_exception_again, include functexcept.h so that -fno-exceptions will build. From-SVN: r55988
50 lines
1.2 KiB
C++
50 lines
1.2 KiB
C++
// Copyright (C) 2002 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 2, 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 COPYING. If not, write to the Free
|
|
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
|
// USA.
|
|
|
|
// backward strstream members
|
|
|
|
#include <strstream>
|
|
#include <testsuite_hooks.h>
|
|
|
|
// { dg-options "-Wno-deprecated" }
|
|
|
|
int test01()
|
|
{
|
|
std::strstream s;
|
|
for (unsigned i=0 ; i!= 1000 ; ++i)
|
|
s << i << std::endl;
|
|
s << std::ends;
|
|
return 0;
|
|
}
|
|
|
|
|
|
int test02()
|
|
{
|
|
std::ostrstream buf;
|
|
buf << std::ends;
|
|
char *s = buf.str ();
|
|
delete [] s;
|
|
}
|
|
|
|
int main()
|
|
{
|
|
test01();
|
|
test02();
|
|
return 0;
|
|
}
|