acinclude.m4 (GLIBCPP_ENABLE_CSTDIO): Force glibc_satisfactory to no...

2000-09-06  Benjamin Kosnik  <bkoz@purist.soma.redhat.com>

	* acinclude.m4 (GLIBCPP_ENABLE_CSTDIO): Force glibc_satisfactory
	to no, so that libstdc++-v3's libio will be built on glibc-2.2
	systems.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* */Makefile.in: Regenerate.

	* bits/std_cwctype.h: Put in temporary hack to work around -O2 +
	glibc 2.1.x unsigned errors. Or disable -Werror by default...

	* testsuite/23_containers/vector_element_access.cc: New file.
	* bits/stl_config.h (__STL_THROW_RANGE_ERRORS): Define.

From-SVN: r36218
This commit is contained in:
Benjamin Kosnik 2000-09-07 01:02:01 +00:00 committed by Benjamin Kosnik
parent 0806f95fb4
commit f133a43eab
11 changed files with 1034 additions and 921 deletions

View File

@ -1,3 +1,18 @@
2000-09-06 Benjamin Kosnik <bkoz@purist.soma.redhat.com>
* acinclude.m4 (GLIBCPP_ENABLE_CSTDIO): Force glibc_satisfactory
to no, so that libstdc++-v3's libio will be built on glibc-2.2
systems.
* aclocal.m4: Regenerate.
* configure: Regenerate.
* */Makefile.in: Regenerate.
* bits/std_cwctype.h: Put in temporary hack to work around -O2 +
glibc 2.1.x unsigned errors. Or disable -Werror by default...
* testsuite/23_containers/vector_element_access.cc: New file.
* bits/stl_config.h (__STL_THROW_RANGE_ERRORS): Define.
2000-09-06 Levente Farkas <lfarkas@mindmaker.hu>
* bits/string.tcc: Fix up more parameter names.

View File

@ -76,6 +76,8 @@ DLLTOOL = @DLLTOOL@
EXEEXT = @EXEEXT@
EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@
GCC_OBJDIR = @GCC_OBJDIR@
GCJ = @GCJ@
GCJFLAGS = @GCJFLAGS@
GLIBCPP_CFLAGS = @GLIBCPP_CFLAGS@
GLIBCPP_CXXFLAGS = @GLIBCPP_CXXFLAGS@
LIBMATHOBJS = @LIBMATHOBJS@

View File

@ -1235,6 +1235,10 @@ AC_DEFUN(GLIBCPP_ENABLE_CSTDIO, [
;;
esac
# XXX at the moment, admit defeat and force the recompilation
# XXX of glibc even on glibc-2.2 systems, because libio is not synched.
glibc_satisfactory=no
if test x$glibc_satisfactory = x"yes"; then
need_libio=no
need_xtra_libio=no

View File

@ -1247,6 +1247,10 @@ AC_DEFUN(GLIBCPP_ENABLE_CSTDIO, [
;;
esac
# XXX at the moment, admit defeat and force the recompilation
# XXX of glibc even on glibc-2.2 systems, because libio is not synched.
glibc_satisfactory=no
if test x$glibc_satisfactory = x"yes"; then
need_libio=no
need_xtra_libio=no

View File

@ -34,6 +34,12 @@
#ifndef _CPP_CWCTYPE
#define _CPP_CWCTYPE 1
// XXX 2000-09-06 get unsigned warnings in glibc 2.1.x
// XXX either remove -Werror or do this hackery
#if __GLIBC__ >= 2 && __GLIBC_MINOR__ < 2 && defined(__OPTIMIZE__)
#undef __OPTIMIZE__
#endif
# pragma GCC system_header
# include_next <wctype.h>

View File

@ -266,6 +266,7 @@
# define __STL_HAS_NAMESPACES
# define __STL_USE_NAMESPACES
# define __STL_USE_EXCEPTIONS
# define __STL_THROW_RANGE_ERRORS
# define __STL_CAN_THROW_RANGE_ERRORS
# define __STL_USE_STD_ALLOCATORS
# define __USE_MALLOC // As the "underlying allocator"

1846
libstdc++-v3/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -76,6 +76,8 @@ DLLTOOL = @DLLTOOL@
EXEEXT = @EXEEXT@
EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@
GCC_OBJDIR = @GCC_OBJDIR@
GCJ = @GCJ@
GCJFLAGS = @GCJFLAGS@
GLIBCPP_CFLAGS = @GLIBCPP_CFLAGS@
GLIBCPP_CXXFLAGS = @GLIBCPP_CXXFLAGS@
LIBMATHOBJS = @LIBMATHOBJS@

View File

@ -76,6 +76,8 @@ DLLTOOL = @DLLTOOL@
EXEEXT = @EXEEXT@
EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@
GCC_OBJDIR = @GCC_OBJDIR@
GCJ = @GCJ@
GCJFLAGS = @GCJFLAGS@
GLIBCPP_CFLAGS = @GLIBCPP_CFLAGS@
GLIBCPP_CXXFLAGS = @GLIBCPP_CXXFLAGS@
LIBMATHOBJS = @LIBMATHOBJS@

View File

@ -75,6 +75,8 @@ DLLTOOL = @DLLTOOL@
EXEEXT = @EXEEXT@
EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@
GCC_OBJDIR = @GCC_OBJDIR@
GCJ = @GCJ@
GCJFLAGS = @GCJFLAGS@
GLIBCPP_CFLAGS = @GLIBCPP_CFLAGS@
GLIBCPP_CXXFLAGS = @GLIBCPP_CXXFLAGS@
LIBMATHOBJS = @LIBMATHOBJS@

View File

@ -0,0 +1,71 @@
// 2000-09-06
// bkoz
// Copyright (C) 2000 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.
// 23.2.4 vector
#include <vector>
#include <stdexcept>
#include <debug_assert.h>
template<typename T>
struct A { };
struct B { };
// http://sources.redhat.com/ml/libstdc++/2000-09/msg00002.html
bool test01()
{
bool test = true;
std::vector< A<B> > vec01;
std::vector< A<B> > vec02(5);
typedef std::vector< A<B> >::size_type size_type;
typedef std::vector< A<B> >::reference reference;
try
{
reference r01 = vec01.at(6);
VERIFY( false ); // Should not get here, as exception thrown.
}
catch(std::out_of_range& err)
{
VERIFY( true );
}
catch(...)
{
VERIFY( false );
}
#ifdef DEBUG_ASSERT
assert(test);
#endif
return test;
}
int main()
{
test01();
return 0;
}