aboutsummaryrefslogtreecommitdiff
path: root/contrib/libstdc++/libsupc++
diff options
context:
space:
mode:
authorAlexander Kabaev <kan@FreeBSD.org>2002-09-01 20:39:13 +0000
committerAlexander Kabaev <kan@FreeBSD.org>2002-09-01 20:39:13 +0000
commitca6500fcd0812d2b2da8a62d52b3613b4cbab12a (patch)
treef69812e8f56ae46c848e604412b0729b776c7756 /contrib/libstdc++/libsupc++
parentbb3c979bf518abbe971bd277250c68a3ec567b59 (diff)
downloadsrc-ca6500fcd0812d2b2da8a62d52b3613b4cbab12a.tar.gz
src-ca6500fcd0812d2b2da8a62d52b3613b4cbab12a.zip
Gcc 3.2.1-prerelease libf2c bits from the FSF anoncvs repo gcc-3_2-branch on 1-Sep-2002 00:00:01 EDT.
Notes
Notes: svn path=/vendor/gcc/dist/; revision=102782
Diffstat (limited to 'contrib/libstdc++/libsupc++')
-rw-r--r--contrib/libstdc++/libsupc++/Makefile.am34
-rw-r--r--contrib/libstdc++/libsupc++/Makefile.in78
-rw-r--r--contrib/libstdc++/libsupc++/cxxabi.h30
-rw-r--r--contrib/libstdc++/libsupc++/eh_alloc.cc2
-rw-r--r--contrib/libstdc++/libsupc++/new6
-rw-r--r--contrib/libstdc++/libsupc++/new_handler.cc2
-rw-r--r--contrib/libstdc++/libsupc++/new_op.cc4
-rw-r--r--contrib/libstdc++/libsupc++/pure.cc4
-rw-r--r--contrib/libstdc++/libsupc++/tinfo.cc8
-rw-r--r--contrib/libstdc++/libsupc++/tinfo2.cc8
10 files changed, 89 insertions, 87 deletions
diff --git a/contrib/libstdc++/libsupc++/Makefile.am b/contrib/libstdc++/libsupc++/Makefile.am
index e37613f1e8fd..0a741defff19 100644
--- a/contrib/libstdc++/libsupc++/Makefile.am
+++ b/contrib/libstdc++/libsupc++/Makefile.am
@@ -49,7 +49,7 @@ OPTIMIZE_CXXFLAGS = @OPTIMIZE_CXXFLAGS@
# or configure.in to see how they are set. See GLIBCPP_EXPORT_FLAGS
# NB: DEBUGFLAGS have to be at the end so that -O2 can be overridden.
CONFIG_CXXFLAGS = \
- @EXTRA_CXX_FLAGS@ @SECTION_FLAGS@ @CSHADOW_FLAGS@ @DEBUG_FLAGS@
+ @EXTRA_CXX_FLAGS@ @SECTION_FLAGS@ @DEBUG_FLAGS@
# Warning flags to use.
WARN_CXXFLAGS = \
@@ -58,21 +58,23 @@ WARN_CXXFLAGS = \
# Use common includes from acinclude.m4/GLIBCPP_EXPORT_INCLUDES
GLIBCPP_INCLUDES = @GLIBCPP_INCLUDES@
LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@
+GCC_INCLUDES = -I$(toplevel_srcdir)/gcc -I$(toplevel_srcdir)/include
INCLUDES = \
- -I$(toplevel_srcdir)/gcc -I$(toplevel_srcdir)/include \
- $(GLIBCPP_INCLUDES) $(LIBSUPCXX_INCLUDES)
+ $(GCC_INCLUDES) $(GLIBCPP_INCLUDES) $(LIBSUPCXX_INCLUDES)
headers = \
exception new typeinfo cxxabi.h exception_defines.h
-sources = \
+c_sources = \
cxa_demangle.c \
+ dyn-string.c
+
+sources = \
del_op.cc \
del_opnt.cc \
del_opv.cc \
del_opvnt.cc \
- dyn-string.c \
eh_alloc.cc \
eh_aux_runtime.cc \
eh_catch.cc \
@@ -92,34 +94,40 @@ sources = \
tinfo2.cc \
vec.cc
-libsupc___la_SOURCES = $(sources)
-libsupc__convenience_la_SOURCES = $(sources)
+libsupc___la_SOURCES = $(sources) $(c_sources)
+libsupc__convenience_la_SOURCES = $(sources) $(c_sources)
glibcppinstalldir = @gxx_include_dir@
glibcppinstall_HEADERS = $(headers)
LIBSUPCXX_CXXFLAGS = $(LIBSUPCXX_PICFLAGS)
-# Use special rules for pulling things out of libiberty.
+# Use special rules for pulling things out of libiberty. These
+# objects should be compiled with the "C" compiler, not the C++
+# compiler, and also should not use the C++ includes.
+C_COMPILE = \
+ $(CC) $(DEFS) $(GCC_INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+
cxa_demangle.c:
rm -f $@
$(LN_S) $(toplevel_srcdir)/libiberty/cp-demangle.c $@
cxa_demangle.lo: cxa_demangle.c
$(LTCOMPILE) -DIN_GLIBCPP_V3 -Wno-error -c $<
cxa_demangle.o: cxa_demangle.c
- $(COMPILE) -DIN_GLIBCPP_V3 -Wno-error -c $<
+ $(C_COMPILE) -DIN_GLIBCPP_V3 -Wno-error -c $<
dyn-string.c:
rm -f $@
$(LN_S) $(toplevel_srcdir)/libiberty/dyn-string.c $@
dyn-string.lo: dyn-string.c
$(LTCOMPILE) -DIN_GLIBCPP_V3 -Wno-error -c $<
dyn-string.o: dyn-string.c
- $(COMPILE) -DIN_GLIBCPP_V3 -Wno-error -c $<
+ $(C_COMPILE) -DIN_GLIBCPP_V3 -Wno-error -c $<
# LTCOMPILE is copied from LTCXXCOMPILE below.
-LTCOMPILE = $(LIBTOOL) --tag CC --tag disable-shared \
- --mode=compile $(CC) $(INCLUDES) \
- $(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(AM_CXXFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag CC --tag disable-shared --mode=compile $(CC) \
+ $(DEFS) $(GCC_INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(AM_CXXFLAGS)
# AM_CXXFLAGS needs to be in each subdirectory so that it can be
diff --git a/contrib/libstdc++/libsupc++/Makefile.in b/contrib/libstdc++/libsupc++/Makefile.in
index 84f85d3785cd..4badadbaea1c 100644
--- a/contrib/libstdc++/libsupc++/Makefile.in
+++ b/contrib/libstdc++/libsupc++/Makefile.in
@@ -68,37 +68,22 @@ AS = @AS@
ATOMICITY_INC_SRCDIR = @ATOMICITY_INC_SRCDIR@
AWK = @AWK@
BASIC_FILE_H = @BASIC_FILE_H@
-BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
-CATALOGS = @CATALOGS@
-CATOBJEXT = @CATOBJEXT@
CCODECVT_C = @CCODECVT_C@
CCODECVT_H = @CCODECVT_H@
CLOCALE_H = @CLOCALE_H@
CMESSAGES_H = @CMESSAGES_H@
CPP = @CPP@
CPU_LIMITS_INC_SRCDIR = @CPU_LIMITS_INC_SRCDIR@
-CSHADOW_FLAGS = @CSHADOW_FLAGS@
CSTDIO_H = @CSTDIO_H@
CXXCPP = @CXXCPP@
C_INCLUDE_DIR = @C_INCLUDE_DIR@
-DATADIRNAME = @DATADIRNAME@
DEBUG_FLAGS = @DEBUG_FLAGS@
DLLTOOL = @DLLTOOL@
EXEEXT = @EXEEXT@
EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@
GCJ = @GCJ@
GCJFLAGS = @GCJFLAGS@
-GENCAT = @GENCAT@
-GLIBC21 = @GLIBC21@
GLIBCPP_IS_CROSS_COMPILING = @GLIBCPP_IS_CROSS_COMPILING@
-GMOFILES = @GMOFILES@
-GMSGFMT = @GMSGFMT@
-INSTOBJEXT = @INSTOBJEXT@
-INTLBISON = @INTLBISON@
-INTLLIBS = @INTLLIBS@
-INTLOBJS = @INTLOBJS@
-INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
-LIBICONV = @LIBICONV@
LIBIO_INCLUDES = @LIBIO_INCLUDES@
LIBMATHOBJS = @LIBMATHOBJS@
LIBMATH_INCLUDES = @LIBMATH_INCLUDES@
@@ -108,25 +93,21 @@ LIBUNWIND_FLAG = @LIBUNWIND_FLAG@
LN_S = @LN_S@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
-MKINSTALLDIRS = @MKINSTALLDIRS@
-MSGFMT = @MSGFMT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OPT_LDFLAGS = @OPT_LDFLAGS@
OS_INC_SRCDIR = @OS_INC_SRCDIR@
PACKAGE = @PACKAGE@
-POFILES = @POFILES@
-POSUB = @POSUB@
RANLIB = @RANLIB@
SECTION_FLAGS = @SECTION_FLAGS@
SECTION_LDFLAGS = @SECTION_LDFLAGS@
STRIP = @STRIP@
TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@
-USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
WARN_FLAGS = @WARN_FLAGS@
WERROR = @WERROR@
+baseline_file = @baseline_file@
check_msgfmt = @check_msgfmt@
enable_shared = @enable_shared@
enable_static = @enable_static@
@@ -145,7 +126,6 @@ gxx_include_dir = @gxx_include_dir@
ifGNUmake = @ifGNUmake@
libio_la = @libio_la@
libtool_VERSION = @libtool_VERSION@
-release_VERSION = @release_VERSION@
toplevel_srcdir = @toplevel_srcdir@
AUTOMAKE_OPTIONS = 1.3 cygnus
@@ -174,7 +154,7 @@ OPTIMIZE_CXXFLAGS = @OPTIMIZE_CXXFLAGS@
# or configure.in to see how they are set. See GLIBCPP_EXPORT_FLAGS
# NB: DEBUGFLAGS have to be at the end so that -O2 can be overridden.
CONFIG_CXXFLAGS = \
- @EXTRA_CXX_FLAGS@ @SECTION_FLAGS@ @CSHADOW_FLAGS@ @DEBUG_FLAGS@
+ @EXTRA_CXX_FLAGS@ @SECTION_FLAGS@ @DEBUG_FLAGS@
# Warning flags to use.
@@ -185,23 +165,26 @@ WARN_CXXFLAGS = \
# Use common includes from acinclude.m4/GLIBCPP_EXPORT_INCLUDES
GLIBCPP_INCLUDES = @GLIBCPP_INCLUDES@
LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@
+GCC_INCLUDES = -I$(toplevel_srcdir)/gcc -I$(toplevel_srcdir)/include
INCLUDES = \
- -I$(toplevel_srcdir)/gcc -I$(toplevel_srcdir)/include \
- $(GLIBCPP_INCLUDES) $(LIBSUPCXX_INCLUDES)
+ $(GCC_INCLUDES) $(GLIBCPP_INCLUDES) $(LIBSUPCXX_INCLUDES)
headers = \
exception new typeinfo cxxabi.h exception_defines.h
-sources = \
+c_sources = \
cxa_demangle.c \
+ dyn-string.c
+
+
+sources = \
del_op.cc \
del_opnt.cc \
del_opv.cc \
del_opvnt.cc \
- dyn-string.c \
eh_alloc.cc \
eh_aux_runtime.cc \
eh_catch.cc \
@@ -222,18 +205,26 @@ sources = \
vec.cc
-libsupc___la_SOURCES = $(sources)
-libsupc__convenience_la_SOURCES = $(sources)
+libsupc___la_SOURCES = $(sources) $(c_sources)
+libsupc__convenience_la_SOURCES = $(sources) $(c_sources)
glibcppinstalldir = @gxx_include_dir@
glibcppinstall_HEADERS = $(headers)
LIBSUPCXX_CXXFLAGS = $(LIBSUPCXX_PICFLAGS)
+# Use special rules for pulling things out of libiberty. These
+# objects should be compiled with the "C" compiler, not the C++
+# compiler, and also should not use the C++ includes.
+C_COMPILE = \
+ $(CC) $(DEFS) $(GCC_INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+
+
# LTCOMPILE is copied from LTCXXCOMPILE below.
-LTCOMPILE = $(LIBTOOL) --tag CC --tag disable-shared \
- --mode=compile $(CC) $(INCLUDES) \
- $(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(AM_CXXFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag CC --tag disable-shared --mode=compile $(CC) \
+ $(DEFS) $(GCC_INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(AM_CXXFLAGS)
# AM_CXXFLAGS needs to be in each subdirectory so that it can be
@@ -296,18 +287,18 @@ LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
libsupc__convenience_la_LDFLAGS =
libsupc__convenience_la_LIBADD =
-libsupc__convenience_la_OBJECTS = cxa_demangle.lo del_op.lo del_opnt.lo \
-del_opv.lo del_opvnt.lo dyn-string.lo eh_alloc.lo eh_aux_runtime.lo \
-eh_catch.lo eh_exception.lo eh_globals.lo eh_personality.lo \
-eh_terminate.lo eh_throw.lo eh_type.lo new_handler.lo new_op.lo \
-new_opnt.lo new_opv.lo new_opvnt.lo pure.lo tinfo.lo tinfo2.lo vec.lo
+libsupc__convenience_la_OBJECTS = del_op.lo del_opnt.lo del_opv.lo \
+del_opvnt.lo eh_alloc.lo eh_aux_runtime.lo eh_catch.lo eh_exception.lo \
+eh_globals.lo eh_personality.lo eh_terminate.lo eh_throw.lo eh_type.lo \
+new_handler.lo new_op.lo new_opnt.lo new_opv.lo new_opvnt.lo pure.lo \
+tinfo.lo tinfo2.lo vec.lo cxa_demangle.lo dyn-string.lo
libsupc___la_LDFLAGS =
libsupc___la_LIBADD =
-libsupc___la_OBJECTS = cxa_demangle.lo del_op.lo del_opnt.lo del_opv.lo \
-del_opvnt.lo dyn-string.lo eh_alloc.lo eh_aux_runtime.lo eh_catch.lo \
-eh_exception.lo eh_globals.lo eh_personality.lo eh_terminate.lo \
-eh_throw.lo eh_type.lo new_handler.lo new_op.lo new_opnt.lo new_opv.lo \
-new_opvnt.lo pure.lo tinfo.lo tinfo2.lo vec.lo
+libsupc___la_OBJECTS = del_op.lo del_opnt.lo del_opv.lo del_opvnt.lo \
+eh_alloc.lo eh_aux_runtime.lo eh_catch.lo eh_exception.lo eh_globals.lo \
+eh_personality.lo eh_terminate.lo eh_throw.lo eh_type.lo new_handler.lo \
+new_op.lo new_opnt.lo new_opv.lo new_opvnt.lo pure.lo tinfo.lo \
+tinfo2.lo vec.lo cxa_demangle.lo dyn-string.lo
CXXFLAGS = @CXXFLAGS@
CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
CXXLD = $(CXX)
@@ -560,21 +551,20 @@ mostlyclean-generic distclean-generic clean-generic \
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
-# Use special rules for pulling things out of libiberty.
cxa_demangle.c:
rm -f $@
$(LN_S) $(toplevel_srcdir)/libiberty/cp-demangle.c $@
cxa_demangle.lo: cxa_demangle.c
$(LTCOMPILE) -DIN_GLIBCPP_V3 -Wno-error -c $<
cxa_demangle.o: cxa_demangle.c
- $(COMPILE) -DIN_GLIBCPP_V3 -Wno-error -c $<
+ $(C_COMPILE) -DIN_GLIBCPP_V3 -Wno-error -c $<
dyn-string.c:
rm -f $@
$(LN_S) $(toplevel_srcdir)/libiberty/dyn-string.c $@
dyn-string.lo: dyn-string.c
$(LTCOMPILE) -DIN_GLIBCPP_V3 -Wno-error -c $<
dyn-string.o: dyn-string.c
- $(COMPILE) -DIN_GLIBCPP_V3 -Wno-error -c $<
+ $(C_COMPILE) -DIN_GLIBCPP_V3 -Wno-error -c $<
# We have to have rules modified from the default to counteract SUN make
# prepending each of $(glibcppinstall_HEADERS) with VPATH below.
diff --git a/contrib/libstdc++/libsupc++/cxxabi.h b/contrib/libstdc++/libsupc++/cxxabi.h
index dd6b774116e1..371b77ef2b87 100644
--- a/contrib/libstdc++/libsupc++/cxxabi.h
+++ b/contrib/libstdc++/libsupc++/cxxabi.h
@@ -1,6 +1,6 @@
// new abi support -*- C++ -*-
-// Copyright (C) 2000 Free Software Foundation, Inc.
+// Copyright (C) 2000, 2002 Free Software Foundation, Inc.
//
// This file is part of GNU CC.
//
@@ -117,7 +117,7 @@ class __pbase_type_info
{
/* abi defined member variables */
public:
- unsigned int __qualifier_flags; /* qualification of the target object */
+ unsigned int __flags; /* qualification of the target object */
const std::type_info *__pointee; /* type of pointed to object */
/* abi defined member functions */
@@ -127,12 +127,12 @@ public:
explicit __pbase_type_info (const char *__n,
int __quals,
const std::type_info *__type)
- : std::type_info (__n), __qualifier_flags (__quals), __pointee (__type)
+ : std::type_info (__n), __flags (__quals), __pointee (__type)
{ }
/* implementation defined types */
public:
- enum __qualifier_masks {
+ enum __masks {
__const_mask = 0x1,
__volatile_mask = 0x2,
__restrict_mask = 0x4,
@@ -181,7 +181,7 @@ class __pointer_to_member_type_info
{
/* abi defined member variables */
public:
- __class_type_info *__context_class; /* class of the member */
+ __class_type_info *__context; /* class of the member */
/* abi defined member functions */
public:
@@ -191,7 +191,7 @@ public:
int __quals,
const std::type_info *__type,
__class_type_info *__klass)
- : __pbase_type_info (__n, __quals, __type), __context_class (__klass)
+ : __pbase_type_info (__n, __quals, __type), __context (__klass)
{ }
/* implementation defined member functions */
@@ -204,11 +204,11 @@ protected:
class __class_type_info;
/* helper class for __vmi_class_type */
-class __base_class_info
+class __base_class_type_info
{
/* abi defined member variables */
public:
- const __class_type_info *__base; /* base class type */
+ const __class_type_info* __base_type; /* base class type */
long __offset_flags; /* offset and info */
/* implementation defined types */
@@ -216,8 +216,8 @@ public:
enum __offset_flags_masks {
__virtual_mask = 0x1,
__public_mask = 0x2,
- hwm_bit = 2,
- offset_shift = 8 /* bits to shift offset by */
+ __hwm_bit = 2,
+ __offset_shift = 8 /* bits to shift offset by */
};
/* implementation defined member functions */
@@ -230,7 +230,7 @@ public:
{
// This shift, being of a signed type, is implementation defined. GCC
// implements such shifts as arithmetic, which is what we want.
- return static_cast<__PTRDIFF_TYPE__> (__offset_flags) >> offset_shift;
+ return static_cast<__PTRDIFF_TYPE__> (__offset_flags) >> __offset_shift;
}
};
@@ -259,9 +259,9 @@ public:
/* publicly) */
__contained_ambig, /* contained ambiguously */
- __contained_virtual_mask = __base_class_info::__virtual_mask, /* via a virtual path */
- __contained_public_mask = __base_class_info::__public_mask, /* via a public path */
- __contained_mask = 1 << __base_class_info::hwm_bit, /* contained within us */
+ __contained_virtual_mask = __base_class_type_info::__virtual_mask, /* via a virtual path */
+ __contained_public_mask = __base_class_type_info::__public_mask, /* via a public path */
+ __contained_mask = 1 << __base_class_type_info::__hwm_bit, /* contained within us */
__contained_private = __contained_mask,
__contained_public = __contained_mask | __contained_public_mask
@@ -365,7 +365,7 @@ class __vmi_class_type_info : public __class_type_info {
public:
unsigned int __flags; /* details about the class hierarchy */
unsigned int __base_count; /* number of direct bases */
- __base_class_info const __base_info[1]; /* array of bases */
+ __base_class_type_info __base_info[1]; /* array of bases */
/* The array of bases uses the trailing array struct hack
so this class is not constructable with a normal constructor. It is
internally generated by the compiler. */
diff --git a/contrib/libstdc++/libsupc++/eh_alloc.cc b/contrib/libstdc++/libsupc++/eh_alloc.cc
index 1f59ec463946..b328acbc914c 100644
--- a/contrib/libstdc++/libsupc++/eh_alloc.cc
+++ b/contrib/libstdc++/libsupc++/eh_alloc.cc
@@ -30,10 +30,10 @@
// This is derived from the C++ ABI for IA-64. Where we diverge
// for cross-architecture compatibility are noted with "@@@".
-#include <exception>
#include <cstdlib>
#include <cstring>
#include <climits>
+#include <exception>
#include "unwind-cxx.h"
#include "bits/c++config.h"
#include "bits/gthr.h"
diff --git a/contrib/libstdc++/libsupc++/new b/contrib/libstdc++/libsupc++/new
index afa603a786d7..475083be3fc1 100644
--- a/contrib/libstdc++/libsupc++/new
+++ b/contrib/libstdc++/libsupc++/new
@@ -62,7 +62,7 @@ namespace std
* be of this type. */
typedef void (*new_handler)();
/// Takes a replacement handler as the argument, returns the previous handler.
- new_handler set_new_handler(new_handler);
+ new_handler set_new_handler(new_handler) throw();
} // namespace std
//@{
@@ -88,6 +88,10 @@ void operator delete[](void*, const std::nothrow_t&) throw();
// Default placement versions of operator new.
inline void* operator new(std::size_t, void* __p) throw() { return __p; }
inline void* operator new[](std::size_t, void* __p) throw() { return __p; }
+
+// Default placement versions of operator delete.
+inline void operator delete (void*, void*) throw() { };
+inline void operator delete[](void*, void*) throw() { };
//@}
} // extern "C++"
diff --git a/contrib/libstdc++/libsupc++/new_handler.cc b/contrib/libstdc++/libsupc++/new_handler.cc
index ed34bc8865d4..7c6aae08ec5a 100644
--- a/contrib/libstdc++/libsupc++/new_handler.cc
+++ b/contrib/libstdc++/libsupc++/new_handler.cc
@@ -37,7 +37,7 @@ using std::new_handler;
new_handler __new_handler;
new_handler
-std::set_new_handler (new_handler handler)
+std::set_new_handler (new_handler handler) throw()
{
new_handler prev_handler = __new_handler;
__new_handler = handler;
diff --git a/contrib/libstdc++/libsupc++/new_op.cc b/contrib/libstdc++/libsupc++/new_op.cc
index df43e6e45769..6e83b39bb1f1 100644
--- a/contrib/libstdc++/libsupc++/new_op.cc
+++ b/contrib/libstdc++/libsupc++/new_op.cc
@@ -1,5 +1,5 @@
// Support routines for the -*- C++ -*- dynamic memory management.
-// Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation
//
// This file is part of GNU CC.
//
@@ -33,8 +33,8 @@
using std::new_handler;
using std::bad_alloc;
+using std::malloc;
-extern "C" void *malloc (std::size_t);
extern new_handler __new_handler;
void *
diff --git a/contrib/libstdc++/libsupc++/pure.cc b/contrib/libstdc++/libsupc++/pure.cc
index 5f9b3c868ccb..1f351334b745 100644
--- a/contrib/libstdc++/libsupc++/pure.cc
+++ b/contrib/libstdc++/libsupc++/pure.cc
@@ -39,8 +39,8 @@
/*# define write(fd, buf, n) __write((fd), (buf), (n))*/
# endif
#else
-# include <stdio.h>
-# define writestr(str) fputs(str, stderr)
+# include <cstdio>
+# define writestr(str) std::fputs(str, stderr)
#endif
extern "C" void
diff --git a/contrib/libstdc++/libsupc++/tinfo.cc b/contrib/libstdc++/libsupc++/tinfo.cc
index 1eecdeb41a15..be041048a602 100644
--- a/contrib/libstdc++/libsupc++/tinfo.cc
+++ b/contrib/libstdc++/libsupc++/tinfo.cc
@@ -295,7 +295,7 @@ __do_find_public_src (ptrdiff_t src2dst,
}
base = convert_to_base (base, is_virtual, offset);
- __sub_kind base_kind = __base_info[i].__base->__do_find_public_src
+ __sub_kind base_kind = __base_info[i].__base_type->__do_find_public_src
(src2dst, base, src_type, src_ptr);
if (contained_p (base_kind))
{
@@ -432,7 +432,7 @@ __do_dyncast (ptrdiff_t src2dst,
}
bool result2_ambig
- = __base_info[i].__base->__do_dyncast (src2dst, base_access,
+ = __base_info[i].__base_type->__do_dyncast (src2dst, base_access,
dst_type, base,
src_type, src_ptr, result2);
result.whole2src = __sub_kind (result.whole2src | result2.whole2src);
@@ -616,10 +616,10 @@ __do_upcast (const __class_type_info *dst, const void *obj_ptr,
if (base)
base = convert_to_base (base, is_virtual, offset);
- if (__base_info[i].__base->__do_upcast (dst, base, result2))
+ if (__base_info[i].__base_type->__do_upcast (dst, base, result2))
{
if (result2.base_type == nonvirtual_base_type && is_virtual)
- result2.base_type = __base_info[i].__base;
+ result2.base_type = __base_info[i].__base_type;
if (contained_p (result2.part2dst) && !is_public)
result2.part2dst = __sub_kind (result2.part2dst & ~__contained_public_mask);
diff --git a/contrib/libstdc++/libsupc++/tinfo2.cc b/contrib/libstdc++/libsupc++/tinfo2.cc
index 8f3d6319c382..600cdf6ae440 100644
--- a/contrib/libstdc++/libsupc++/tinfo2.cc
+++ b/contrib/libstdc++/libsupc++/tinfo2.cc
@@ -1,6 +1,6 @@
// Methods for type_info for -*- C++ -*- Run Time Type Identification.
-// Copyright (C) 1994, 1996, 1997, 1998, 1999, 2000, 2001
+// Copyright (C) 1994, 1996, 1997, 1998, 1999, 2000, 2001, 2002
// Free Software Foundation
//
// This file is part of GNU CC.
@@ -116,11 +116,11 @@ __do_catch (const type_info *thr_type,
const __pbase_type_info *thrown_type =
static_cast <const __pbase_type_info *> (thr_type);
- if (thrown_type->__qualifier_flags & ~__qualifier_flags)
+ if (thrown_type->__flags & ~__flags)
// We're less qualified.
return false;
- if (!(__qualifier_flags & __const_mask))
+ if (!(__flags & __const_mask))
outer &= ~1;
return __pointer_catch (thrown_type, thr_obj, outer);
@@ -158,7 +158,7 @@ __pointer_catch (const __pbase_type_info *thr_type,
const __pointer_to_member_type_info *thrown_type =
static_cast <const __pointer_to_member_type_info *> (thr_type);
- if (*__context_class != *thrown_type->__context_class)
+ if (*__context != *thrown_type->__context)
return false; // not pointers to member of same class
return __pbase_type_info::__pointer_catch (thrown_type, thr_obj, outer);