GCC 4.2.1 release C++ standard library and runtime support code.

This commit is contained in:
Alexander Kabaev 2007-08-14 02:49:11 +00:00
parent 23baddbde1
commit 0995a43fe6
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/vendor/gcc/dist/; revision=171827
13 changed files with 494 additions and 186 deletions

View File

@ -1,3 +1,70 @@
2007-07-19 Release Manager
* GCC 4.2.1 released.
2007-07-05 Joerg Richter <joerg.richter@pdv-fs.de>
PR libstdc++/31957
* include/Makefile.am: Work around an AIX sed oddity.
* include/Makefile.in: Regenerate.
2007-06-28 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/32509
* acinclude.m4 (GLIBCXX_ENABLE_CLOCALE): Carry out the checks
involving the de_DE locale only if an auto locale config is
used for a target suitable for the gnu locale model.
* docs/html/install.html: Update.
* configure: Regenerated.
2007-06-26 Benjamin Kosnik <bkoz@redhat.com>
* include/ext/throw_allocator.h: Fixes for -fno-exceptions.
* testsuite/util/testsuite_shared.cc: Same.
* testsuite/util/io/illegal_input_error.hpp: Same.
* testsuite/util/io/verified_cmd_line_input.cc: Same.
* libsupc++/typeinfo (type_info): Correct comment formatting,
clarify member access and public interface.
* libsupc++/exception: Less compressed comments.
* libsupc++/new: Same.
2007-06-08 Paolo Carlini <pcarlini@suse.de>
* docs/html/install.html: Adjust consistently with libstdc++/31717.
2007-06-08 Francesco Palagi <palagi@arcetri.astro.it>
* include/std/std_fstream.h: Add Table 92 in comment.
2007-06-06 Benjamin Kosnik <bkoz@redhat.com>
Frank Mori Hess <frank.hess@nist.gov>
* docs/html/debug.html: Correct link.
2007-05-28 Benjamin Kosnik <bkoz@redhat.com>
PR libstdc++/31717
* acinclude.m4 (GLIBCXX_ENABLE_CLOCALE): Re-organize. Sanity check
gnu locale model requests to make sure it will work for the requested
target. Add checks for strxfrm_l, strerror_l when in gnu locale,
and strerror_r everywhere.
* aclocal.m4: Regenerated.
* configure: Regenerated.
* config.h.in: Regenerated.
2007-05-24 Paolo Carlini <pcarlini@suse.de>
* include/bits/ostream.tcc: Do not inhibit implicit instantiation
of __ostream_insert here...
* include/bits/ostream_insert.h: ... do it here.
2007-05-21 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/31621
* acinclude.m4 ([GLIBCXX_CHECK_LINKER_FEATURES]): Use the C compiler.
* configure: Regenerate.
2007-05-13 Release Manager
* GCC 4.2.0 released.

View File

@ -251,11 +251,9 @@ AC_DEFUN([GLIBCXX_CHECK_LINKER_FEATURES], [
# NB: This flag only works reliably after 2.16.1. Configure tests
# for this are difficult, so hard wire a value that should work.
# All these tests are for C++, but run with the "C" compiler driver.
# Need to do this so that g++ won't try to link in libstdc++/libsupc++.
ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS='-x c++ -Wl,--gc-sections'
CFLAGS='-Wl,--gc-sections'
# Check for -Wl,--gc-sections
AC_MSG_CHECKING([for ld that supports -Wl,--gc-sections])
@ -1334,64 +1332,31 @@ dnl
dnl Default is generic.
dnl
AC_DEFUN([GLIBCXX_ENABLE_CLOCALE], [
AC_MSG_CHECKING([for C locale to use])
GLIBCXX_ENABLE(clocale,auto,[@<:@=MODEL@:>@],
[use MODEL for target locale package],
[permit generic|gnu|ieee_1003.1-2001|yes|no|auto])
# Deal with gettext issues. Default to not using it (=no) until we detect
# support for it later. Let the user turn it off via --e/d, but let that
# default to on for easier handling.
USE_NLS=no
AC_ARG_ENABLE(nls,
AC_HELP_STRING([--enable-nls],[use Native Language Support (default)]),
[],
[enable_nls=yes])
# If they didn't use this option switch, or if they specified --enable
# with no specific model, we'll have to look for one. If they
# specified --disable (???), do likewise.
# Either a known packaage, or "auto"
if test $enable_clocale = no || test $enable_clocale = yes; then
enable_clocale=auto
fi
# Either a known package, or "auto"
enable_clocale_flag=$enable_clocale
# Probe for locale support if no specific model is specified.
# Probe for locale model to use if none specified.
# Default to "generic".
if test $enable_clocale_flag = auto; then
case ${target_os} in
linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu)
AC_EGREP_CPP([_GLIBCXX_ok], [
#include <features.h>
#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)
_GLIBCXX_ok
#endif
], enable_clocale_flag=gnu, enable_clocale_flag=generic)
# Test for bugs early in glibc-2.2.x series
if test $enable_clocale_flag = gnu; then
AC_TRY_RUN([
#define _GNU_SOURCE 1
#include <locale.h>
#include <string.h>
#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
extern __typeof(newlocale) __newlocale;
extern __typeof(duplocale) __duplocale;
extern __typeof(strcoll_l) __strcoll_l;
#endif
int main()
{
const char __one[] = "Äuglein Augmen";
const char __two[] = "Äuglein";
int i;
int j;
__locale_t loc;
__locale_t loc_dup;
loc = __newlocale(1 << LC_ALL, "de_DE", 0);
loc_dup = __duplocale(loc);
i = __strcoll_l(__one, __two, loc);
j = __strcoll_l(__one, __two, loc_dup);
return 0;
}
],
[enable_clocale_flag=gnu],[enable_clocale_flag=generic],
[enable_clocale_flag=generic])
fi
# ... at some point put __strxfrm_l tests in as well.
enable_clocale_flag=gnu
;;
darwin* | freebsd*)
enable_clocale_flag=darwin
@ -1402,16 +1367,81 @@ AC_DEFUN([GLIBCXX_ENABLE_CLOCALE], [
esac
fi
# Deal with gettext issues. Default to not using it (=no) until we detect
# support for it later. Let the user turn it off via --e/d, but let that
# default to on for easier handling.
USE_NLS=no
AC_ARG_ENABLE(nls,
AC_HELP_STRING([--enable-nls],[use Native Language Support (default)]),
[],
[enable_nls=yes])
# Sanity check model, and test for special functionality.
if test $enable_clocale_flag = gnu; then
AC_EGREP_CPP([_GLIBCXX_ok], [
#include <features.h>
#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)
_GLIBCXX_ok
#endif
], enable_clocale_flag=gnu, enable_clocale_flag=generic)
if test $enable_clocale = auto; then
# Test for bugs early in glibc-2.2.x series
AC_TRY_RUN([
#define _GNU_SOURCE 1
#include <locale.h>
#include <string.h>
#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
extern __typeof(newlocale) __newlocale;
extern __typeof(duplocale) __duplocale;
extern __typeof(strcoll_l) __strcoll_l;
#endif
int main()
{
const char __one[] = "Äuglein Augmen";
const char __two[] = "Äuglein";
int i;
int j;
__locale_t loc;
__locale_t loc_dup;
loc = __newlocale(1 << LC_ALL, "de_DE", 0);
loc_dup = __duplocale(loc);
i = __strcoll_l(__one, __two, loc);
j = __strcoll_l(__one, __two, loc_dup);
return 0;
}
],
[enable_clocale_flag=gnu],[enable_clocale_flag=generic],
[enable_clocale_flag=generic])
fi
# Set it to scream when it hurts.
ac_save_CFLAGS="$CFLAGS"
CFLAGS="-Wimplicit-function-declaration -Werror"
# Use strxfrm_l if available.
AC_TRY_COMPILE([#define _GNU_SOURCE 1
#include <string.h>
#include <locale.h>],
[char s[128]; __locale_t loc; strxfrm_l(s, "C", 5, loc);],
AC_DEFINE(HAVE_STRXFRM_L, 1,
[Define if strxfrm_l is available in <string.h>.]),)
# Use strerror_l if available.
AC_TRY_COMPILE([#define _GNU_SOURCE 1
#include <string.h>
#include <locale.h>],
[__locale_t loc; strerror_l(5, loc);],
AC_DEFINE(HAVE_STRERROR_L, 1,
[Define if strerror_l is available in <string.h>.]),)
CFLAGS="$ac_save_CFLAGS"
fi
# Perhaps use strerror_r if available, and strerror_l isn't.
ac_save_CFLAGS="$CFLAGS"
CFLAGS="-Wimplicit-function-declaration -Werror"
AC_TRY_COMPILE([#define _GNU_SOURCE 1
#include <string.h>
#include <locale.h>],
[char s[128]; strerror_r(5, s, 128);],
AC_DEFINE(HAVE_STRERROR_R, 1,
[Define if strerror_r is available in <string.h>.]),)
CFLAGS="$ac_save_CFLAGS"
# Set configure bits for specified locale package
AC_MSG_CHECKING([for C locale to use])
case ${enable_clocale_flag} in
generic)
AC_MSG_RESULT(generic)

View File

@ -298,6 +298,12 @@
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define if strerror_l is available in <string.h>. */
#undef HAVE_STRERROR_L
/* Define if strerror_r is available in <string.h>. */
#undef HAVE_STRERROR_R
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
@ -310,6 +316,9 @@
/* Define to 1 if you have the `strtold' function. */
#undef HAVE_STRTOLD
/* Define if strxfrm_l is available in <string.h>. */
#undef HAVE_STRXFRM_L
/* Define to 1 if you have the <sys/filio.h> header file. */
#undef HAVE_SYS_FILIO_H

View File

@ -5764,8 +5764,6 @@ done
echo "$as_me:$LINENO: checking for C locale to use" >&5
echo $ECHO_N "checking for C locale to use... $ECHO_C" >&6
# Check whether --enable-clocale or --disable-clocale was given.
if test "${enable_clocale+set}" = set; then
enableval="$enable_clocale"
@ -5782,32 +5780,53 @@ else
fi;
# If they didn't use this option switch, or if they specified --enable
# with no specific model, we'll have to look for one. If they
# specified --disable (???), do likewise.
# Deal with gettext issues. Default to not using it (=no) until we detect
# support for it later. Let the user turn it off via --e/d, but let that
# default to on for easier handling.
USE_NLS=no
# Check whether --enable-nls or --disable-nls was given.
if test "${enable_nls+set}" = set; then
enableval="$enable_nls"
else
enable_nls=yes
fi;
# Either a known packaage, or "auto"
if test $enable_clocale = no || test $enable_clocale = yes; then
enable_clocale=auto
fi
# Either a known package, or "auto"
enable_clocale_flag=$enable_clocale
# Probe for locale support if no specific model is specified.
# Probe for locale model to use if none specified.
# Default to "generic".
if test $enable_clocale_flag = auto; then
case ${target_os} in
linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu)
cat >conftest.$ac_ext <<_ACEOF
enable_clocale_flag=gnu
;;
darwin* | freebsd*)
enable_clocale_flag=darwin
;;
*)
enable_clocale_flag=generic
;;
esac
fi
# Sanity check model, and test for special functionality.
if test $enable_clocale_flag = gnu; then
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <features.h>
#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)
_GLIBCXX_ok
#endif
#include <features.h>
#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)
_GLIBCXX_ok
#endif
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
@ -5819,9 +5838,9 @@ fi
rm -f conftest*
# Test for bugs early in glibc-2.2.x series
if test $enable_clocale_flag = gnu; then
if test "$cross_compiling" = yes; then
if test $enable_clocale = auto; then
# Test for bugs early in glibc-2.2.x series
if test "$cross_compiling" = yes; then
enable_clocale_flag=generic
else
cat >conftest.$ac_ext <<_ACEOF
@ -5831,28 +5850,28 @@ cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#define _GNU_SOURCE 1
#include <locale.h>
#include <string.h>
#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
extern __typeof(newlocale) __newlocale;
extern __typeof(duplocale) __duplocale;
extern __typeof(strcoll_l) __strcoll_l;
#endif
int main()
{
const char __one[] = "Äuglein Augmen";
const char __two[] = "Äuglein";
int i;
int j;
__locale_t loc;
__locale_t loc_dup;
loc = __newlocale(1 << LC_ALL, "de_DE", 0);
loc_dup = __duplocale(loc);
i = __strcoll_l(__one, __two, loc);
j = __strcoll_l(__one, __two, loc_dup);
return 0;
}
#define _GNU_SOURCE 1
#include <locale.h>
#include <string.h>
#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
extern __typeof(newlocale) __newlocale;
extern __typeof(duplocale) __duplocale;
extern __typeof(strcoll_l) __strcoll_l;
#endif
int main()
{
const char __one[] = "Äuglein Augmen";
const char __two[] = "Äuglein";
int i;
int j;
__locale_t loc;
__locale_t loc_dup;
loc = __newlocale(1 << LC_ALL, "de_DE", 0);
loc_dup = __duplocale(loc);
i = __strcoll_l(__one, __two, loc);
j = __strcoll_l(__one, __two, loc_dup);
return 0;
}
_ACEOF
rm -f conftest$ac_exeext
@ -5877,32 +5896,177 @@ enable_clocale_flag=generic
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
fi
# ... at some point put __strxfrm_l tests in as well.
;;
darwin* | freebsd*)
enable_clocale_flag=darwin
;;
*)
enable_clocale_flag=generic
;;
esac
fi
# Set it to scream when it hurts.
ac_save_CFLAGS="$CFLAGS"
CFLAGS="-Wimplicit-function-declaration -Werror"
# Deal with gettext issues. Default to not using it (=no) until we detect
# support for it later. Let the user turn it off via --e/d, but let that
# default to on for easier handling.
USE_NLS=no
# Check whether --enable-nls or --disable-nls was given.
if test "${enable_nls+set}" = set; then
enableval="$enable_nls"
# Use strxfrm_l if available.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#define _GNU_SOURCE 1
#include <string.h>
#include <locale.h>
int
main ()
{
char s[128]; __locale_t loc; strxfrm_l(s, "C", 5, loc);
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cat >>confdefs.h <<\_ACEOF
#define HAVE_STRXFRM_L 1
_ACEOF
else
enable_nls=yes
fi;
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
# Use strerror_l if available.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#define _GNU_SOURCE 1
#include <string.h>
#include <locale.h>
int
main ()
{
__locale_t loc; strerror_l(5, loc);
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cat >>confdefs.h <<\_ACEOF
#define HAVE_STRERROR_L 1
_ACEOF
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
CFLAGS="$ac_save_CFLAGS"
fi
# Perhaps use strerror_r if available, and strerror_l isn't.
ac_save_CFLAGS="$CFLAGS"
CFLAGS="-Wimplicit-function-declaration -Werror"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#define _GNU_SOURCE 1
#include <string.h>
#include <locale.h>
int
main ()
{
char s[128]; strerror_r(5, s, 128);
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cat >>confdefs.h <<\_ACEOF
#define HAVE_STRERROR_R 1
_ACEOF
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
CFLAGS="$ac_save_CFLAGS"
# Set configure bits for specified locale package
echo "$as_me:$LINENO: checking for C locale to use" >&5
echo $ECHO_N "checking for C locale to use... $ECHO_C" >&6
case ${enable_clocale_flag} in
generic)
echo "$as_me:$LINENO: result: generic" >&5
@ -8015,7 +8179,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
# Fake what AC_TRY_COMPILE does. XXX Look at redoing this new-style.
cat > conftest.$ac_ext << EOF
#line 8018 "configure"
#line 8182 "configure"
int main()
{
// NB: _Atomic_word not necessarily int.
@ -8395,11 +8559,9 @@ echo "${ECHO_T}$glibcxx_gnu_ld_version" >&6
# NB: This flag only works reliably after 2.16.1. Configure tests
# for this are difficult, so hard wire a value that should work.
# All these tests are for C++, but run with the "C" compiler driver.
# Need to do this so that g++ won't try to link in libstdc++/libsupc++.
ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS='-x c++ -Wl,--gc-sections'
CFLAGS='-Wl,--gc-sections'
# Check for -Wl,--gc-sections
echo "$as_me:$LINENO: checking for ld that supports -Wl,--gc-sections" >&5
@ -54307,11 +54469,9 @@ echo "${ECHO_T}$glibcxx_gnu_ld_version" >&6
# NB: This flag only works reliably after 2.16.1. Configure tests
# for this are difficult, so hard wire a value that should work.
# All these tests are for C++, but run with the "C" compiler driver.
# Need to do this so that g++ won't try to link in libstdc++/libsupc++.
ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS='-x c++ -Wl,--gc-sections'
CFLAGS='-Wl,--gc-sections'
# Check for -Wl,--gc-sections
echo "$as_me:$LINENO: checking for ld that supports -Wl,--gc-sections" >&5
@ -75669,11 +75829,9 @@ echo "${ECHO_T}$glibcxx_gnu_ld_version" >&6
# NB: This flag only works reliably after 2.16.1. Configure tests
# for this are difficult, so hard wire a value that should work.
# All these tests are for C++, but run with the "C" compiler driver.
# Need to do this so that g++ won't try to link in libstdc++/libsupc++.
ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS='-x c++ -Wl,--gc-sections'
CFLAGS='-Wl,--gc-sections'
# Check for -Wl,--gc-sections
echo "$as_me:$LINENO: checking for ld that supports -Wl,--gc-sections" >&5
@ -77194,11 +77352,9 @@ echo "${ECHO_T}$glibcxx_gnu_ld_version" >&6
# NB: This flag only works reliably after 2.16.1. Configure tests
# for this are difficult, so hard wire a value that should work.
# All these tests are for C++, but run with the "C" compiler driver.
# Need to do this so that g++ won't try to link in libstdc++/libsupc++.
ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS='-x c++ -Wl,--gc-sections'
CFLAGS='-Wl,--gc-sections'
# Check for -Wl,--gc-sections
echo "$as_me:$LINENO: checking for ld that supports -Wl,--gc-sections" >&5
@ -78687,11 +78843,9 @@ echo "${ECHO_T}$glibcxx_gnu_ld_version" >&6
# NB: This flag only works reliably after 2.16.1. Configure tests
# for this are difficult, so hard wire a value that should work.
# All these tests are for C++, but run with the "C" compiler driver.
# Need to do this so that g++ won't try to link in libstdc++/libsupc++.
ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS='-x c++ -Wl,--gc-sections'
CFLAGS='-Wl,--gc-sections'
# Check for -Wl,--gc-sections
echo "$as_me:$LINENO: checking for ld that supports -Wl,--gc-sections" >&5
@ -100579,11 +100733,9 @@ echo "${ECHO_T}$glibcxx_gnu_ld_version" >&6
# NB: This flag only works reliably after 2.16.1. Configure tests
# for this are difficult, so hard wire a value that should work.
# All these tests are for C++, but run with the "C" compiler driver.
# Need to do this so that g++ won't try to link in libstdc++/libsupc++.
ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS='-x c++ -Wl,--gc-sections'
CFLAGS='-Wl,--gc-sections'
# Check for -Wl,--gc-sections
echo "$as_me:$LINENO: checking for ld that supports -Wl,--gc-sections" >&5
@ -101426,11 +101578,9 @@ echo "${ECHO_T}$glibcxx_gnu_ld_version" >&6
# NB: This flag only works reliably after 2.16.1. Configure tests
# for this are difficult, so hard wire a value that should work.
# All these tests are for C++, but run with the "C" compiler driver.
# Need to do this so that g++ won't try to link in libstdc++/libsupc++.
ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS='-x c++ -Wl,--gc-sections'
CFLAGS='-Wl,--gc-sections'
# Check for -Wl,--gc-sections
echo "$as_me:$LINENO: checking for ld that supports -Wl,--gc-sections" >&5
@ -102829,11 +102979,9 @@ echo "${ECHO_T}$glibcxx_gnu_ld_version" >&6
# NB: This flag only works reliably after 2.16.1. Configure tests
# for this are difficult, so hard wire a value that should work.
# All these tests are for C++, but run with the "C" compiler driver.
# Need to do this so that g++ won't try to link in libstdc++/libsupc++.
ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS='-x c++ -Wl,--gc-sections'
CFLAGS='-Wl,--gc-sections'
# Check for -Wl,--gc-sections
echo "$as_me:$LINENO: checking for ld that supports -Wl,--gc-sections" >&5
@ -104624,11 +104772,9 @@ echo "${ECHO_T}$glibcxx_gnu_ld_version" >&6
# NB: This flag only works reliably after 2.16.1. Configure tests
# for this are difficult, so hard wire a value that should work.
# All these tests are for C++, but run with the "C" compiler driver.
# Need to do this so that g++ won't try to link in libstdc++/libsupc++.
ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS='-x c++ -Wl,--gc-sections'
CFLAGS='-Wl,--gc-sections'
# Check for -Wl,--gc-sections
echo "$as_me:$LINENO: checking for ld that supports -Wl,--gc-sections" >&5
@ -105869,11 +106015,9 @@ echo "${ECHO_T}$glibcxx_gnu_ld_version" >&6
# NB: This flag only works reliably after 2.16.1. Configure tests
# for this are difficult, so hard wire a value that should work.
# All these tests are for C++, but run with the "C" compiler driver.
# Need to do this so that g++ won't try to link in libstdc++/libsupc++.
ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS='-x c++ -Wl,--gc-sections'
CFLAGS='-Wl,--gc-sections'
# Check for -Wl,--gc-sections
echo "$as_me:$LINENO: checking for ld that supports -Wl,--gc-sections" >&5
@ -106898,11 +107042,9 @@ echo "${ECHO_T}$glibcxx_gnu_ld_version" >&6
# NB: This flag only works reliably after 2.16.1. Configure tests
# for this are difficult, so hard wire a value that should work.
# All these tests are for C++, but run with the "C" compiler driver.
# Need to do this so that g++ won't try to link in libstdc++/libsupc++.
ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS='-x c++ -Wl,--gc-sections'
CFLAGS='-Wl,--gc-sections'
# Check for -Wl,--gc-sections
echo "$as_me:$LINENO: checking for ld that supports -Wl,--gc-sections" >&5

View File

@ -986,6 +986,8 @@ stamp-visibility:
echo 0 > stamp-visibility
endif
# NB: The non-empty default ldbl_compat works around an AIX sed
# oddity, see libstdc++/31957 for details.
${host_builddir}/c++config.h: ${CONFIG_HEADER} \
${glibcxx_srcdir}/include/bits/c++config \
stamp-${host_alias} \
@ -995,7 +997,7 @@ ${host_builddir}/c++config.h: ${CONFIG_HEADER} \
@date=`cat ${toplevel_srcdir}/gcc/DATESTAMP` ;\
nsa_version=`cat stamp-namespace-version` ;\
visibility=`cat stamp-visibility` ;\
ldbl_compat='' ;\
ldbl_compat='s,g,g,' ;\
grep "^[ ]*#[ ]*define[ ][ ]*_GLIBCXX_LONG_DOUBLE_COMPAT[ ][ ]*1[ ]*$$" \
${CONFIG_HEADER} > /dev/null 2>&1 \
&& ldbl_compat='s,^#undef _GLIBCXX_LONG_DOUBLE_COMPAT$$,#define _GLIBCXX_LONG_DOUBLE_COMPAT 1,' ;\

View File

@ -1363,6 +1363,8 @@ stamp-host: ${host_headers} ${host_headers_noinst} stamp-${host_alias}
@ENABLE_VISIBILITY_FALSE@stamp-visibility:
@ENABLE_VISIBILITY_FALSE@ echo 0 > stamp-visibility
# NB: The non-empty default ldbl_compat works around an AIX sed
# oddity, see libstdc++/31957 for details.
${host_builddir}/c++config.h: ${CONFIG_HEADER} \
${glibcxx_srcdir}/include/bits/c++config \
stamp-${host_alias} \
@ -1372,7 +1374,7 @@ ${host_builddir}/c++config.h: ${CONFIG_HEADER} \
@date=`cat ${toplevel_srcdir}/gcc/DATESTAMP` ;\
nsa_version=`cat stamp-namespace-version` ;\
visibility=`cat stamp-visibility` ;\
ldbl_compat='' ;\
ldbl_compat='s,g,g,' ;\
grep "^[ ]*#[ ]*define[ ][ ]*_GLIBCXX_LONG_DOUBLE_COMPAT[ ][ ]*1[ ]*$$" \
${CONFIG_HEADER} > /dev/null 2>&1 \
&& ldbl_compat='s,^#undef _GLIBCXX_LONG_DOUBLE_COMPAT$$,#define _GLIBCXX_LONG_DOUBLE_COMPAT 1,' ;\

View File

@ -334,7 +334,6 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
extern template ostream& operator<<(ostream&, const char*);
extern template ostream& operator<<(ostream&, const unsigned char*);
extern template ostream& operator<<(ostream&, const signed char*);
extern template ostream& __ostream_insert(ostream&, const char*, streamsize);
extern template ostream& ostream::_M_insert(long);
extern template ostream& ostream::_M_insert(unsigned long);
@ -356,8 +355,6 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
extern template wostream& operator<<(wostream&, char);
extern template wostream& operator<<(wostream&, const wchar_t*);
extern template wostream& operator<<(wostream&, const char*);
extern template wostream& __ostream_insert(wostream&, const wchar_t*,
streamsize);
extern template wostream& wostream::_M_insert(long);
extern template wostream& wostream::_M_insert(unsigned long);

View File

@ -109,6 +109,18 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
return __out;
}
// Inhibit implicit instantiations for required instantiations,
// which are defined via explicit instantiations elsewhere.
// NB: This syntax is a GNU extension.
#if _GLIBCXX_EXTERN_TEMPLATE
extern template ostream& __ostream_insert(ostream&, const char*, streamsize);
#ifdef _GLIBCXX_USE_WCHAR_T
extern template wostream& __ostream_insert(wostream&, const wchar_t*,
streamsize);
#endif
#endif
_GLIBCXX_END_NAMESPACE
#endif /* _OSTREAM_INSERT_H */

View File

@ -62,6 +62,7 @@
#include <stdexcept>
#include <utility>
#include <tr1/random>
#include <bits/functexcept.h>
_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
@ -81,10 +82,20 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
std::tr1::mt19937 _M_generator;
};
struct forced_exception_error : public std::exception
{ };
// Substitute for concurrence_error object in the case of -fno-exceptions.
inline void
__throw_forced_exception_error()
{
#if __EXCEPTIONS
throw forced_exception_error();
#else
__builtin_abort();
#endif
}
class throw_allocator_base
{
public:
@ -325,7 +336,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
error += '\n';
print_to_string(error, make_entry(p, size));
print_to_string(error, *found_it);
throw std::logic_error(error);
std::__throw_logic_error(error.c_str());
}
_S_map.insert(make_entry(p, size));
}
@ -351,7 +362,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
error += "null erase!";
error += '\n';
print_to_string(error, make_entry(p, size));
throw std::logic_error(error);
std::__throw_logic_error(error.c_str());
}
if (found_it->second.second != size)
@ -361,7 +372,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
error += '\n';
print_to_string(error, make_entry(p, size));
print_to_string(error, *found_it);
throw std::logic_error(error);
std::__throw_logic_error(error.c_str());
}
}
@ -382,7 +393,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
std::string error("throw_allocator_base::check_allocated by label ");
error += '\n';
error += found;
throw std::logic_error(error);
std::__throw_logic_error(error.c_str());
}
}
@ -390,7 +401,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
throw_allocator_base::throw_conditionally()
{
if (_S_g.get_prob() < _S_throw_prob)
throw forced_exception_error();
__throw_forced_exception_error();
}
void

View File

@ -1,6 +1,7 @@
// File based streams -*- C++ -*-
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
// 2006, 2007
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@ -257,9 +258,30 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* Otherwise it tries to open the file named @a s using the flags
* given in @a mode.
*
* [Table 92 gives the relation between openmode combinations and the
* equivalent fopen() flags, but the table has not been copied yet.]
*/
* Table 92, adapted here, gives the relation between openmode
* combinations and the equivalent fopen() flags.
* (NB: lines in|out|app and binary|in|out|app per DR 596)
* +---------------------------------------------------------+
* | ios_base Flag combination stdio equivalent |
* |binary in out trunc app |
* +---------------------------------------------------------+
* | + "w" |
* | + + "a" |
* | + + "w" |
* | + "r" |
* | + + "r+" |
* | + + + "w+" |
* | + + + "a+" |
* +---------------------------------------------------------+
* | + + "wb" |
* | + + + "ab" |
* | + + + "wb" |
* | + + "rb" |
* | + + + "r+b" |
* | + + + + "w+b" |
* | + + + + "a+b" |
* +---------------------------------------------------------+
*/
__filebuf_type*
open(const char* __s, ios_base::openmode __mode);

View File

@ -58,6 +58,7 @@ namespace std
public:
exception() throw() { }
virtual ~exception() throw();
/** Returns a C-style character string describing the general cause
* of the current error. */
virtual const char* what() const throw();
@ -69,26 +70,31 @@ namespace std
{
public:
bad_exception() throw() { }
// This declaration is not useless:
// http://gcc.gnu.org/onlinedocs/gcc-3.0.2/gcc_6.html#SEC118
virtual ~bad_exception() throw();
// See comment in eh_exception.cc.
virtual const char* what() const throw();
};
/// If you write a replacement %terminate handler, it must be of this type.
typedef void (*terminate_handler) ();
/// If you write a replacement %unexpected handler, it must be of this type.
typedef void (*unexpected_handler) ();
/// Takes a new handler function as an argument, returns the old function.
terminate_handler set_terminate(terminate_handler) throw();
/** The runtime will call this function if %exception handling must be
* abandoned for any reason. It can also be called by the user. */
void terminate() __attribute__ ((__noreturn__));
/// Takes a new handler function as an argument, returns the old function.
unexpected_handler set_unexpected(unexpected_handler) throw();
/** The runtime will call this function if an %exception is thrown which
* violates the function's %exception specification. */
void unexpected() __attribute__ ((__noreturn__));

View File

@ -59,19 +59,25 @@ namespace std
{
public:
bad_alloc() throw() { }
// This declaration is not useless:
// http://gcc.gnu.org/onlinedocs/gcc-3.0.2/gcc_6.html#SEC118
virtual ~bad_alloc() throw();
// See comment in eh_exception.cc.
virtual const char* what() const throw();
};
struct nothrow_t { };
extern const nothrow_t nothrow;
/** If you write your own error handler to be called by @c new, it must
* be of this type. */
typedef void (*new_handler)();
/// Takes a replacement handler as the argument, returns the previous handler.
/// Takes a replacement handler as the argument, returns the
/// previous handler.
new_handler set_new_handler(new_handler) throw();
} // namespace std

View File

@ -68,25 +68,12 @@ namespace std
class type_info
{
public:
/** Destructor. Being the first non-inline virtual function, this
/** Destructor first. Being the first non-inline virtual function, this
* controls in which translation unit the vtable is emitted. The
* compiler makes use of that information to know where to emit
* the runtime-mandated type_info structures in the new-abi. */
virtual ~type_info();
private:
/// Assigning type_info is not supported. Made private.
type_info& operator=(const type_info&);
type_info(const type_info&);
protected:
const char *__name;
protected:
explicit type_info(const char *__n): __name(__n) { }
public:
// the public interface
/** Returns an @e implementation-defined byte string; this is not
* portable between compilers! */
const char* name() const
@ -94,6 +81,7 @@ namespace std
#if !__GXX_MERGED_TYPEINFO_NAMES
bool before(const type_info& __arg) const;
// In old abi, or when weak symbols are not supported, there can
// be multiple instances of a type_info object for one
// type. Uniqueness must use the _name value, not object address.
@ -105,19 +93,13 @@ namespace std
// and therefore address comparisons are sufficient.
bool before(const type_info& __arg) const
{ return __name < __arg.__name; }
bool operator==(const type_info& __arg) const
{ return __name == __arg.__name; }
#endif
bool operator!=(const type_info& __arg) const
{ return !operator==(__arg); }
// the internal interface
public:
// return true if this is a pointer type of some kind
virtual bool __is_pointer_p() const;
// return true if this is a function type
virtual bool __is_function_p() const;
// Try and catch a thrown type. Store an adjusted pointer to the
// caught type in THR_OBJ. If THR_TYPE is not a pointer type, then
// THR_OBJ points to the thrown object. If THR_TYPE is a pointer
@ -127,9 +109,25 @@ namespace std
virtual bool __do_catch(const type_info *__thr_type, void **__thr_obj,
unsigned __outer) const;
// internally used during catch matching
// Internally used during catch matching
virtual bool __do_upcast(const __cxxabiv1::__class_type_info *__target,
void **__obj_ptr) const;
// Return true if this is a pointer type of some kind
virtual bool __is_pointer_p() const;
// Return true if this is a function type
virtual bool __is_function_p() const;
protected:
const char *__name;
explicit type_info(const char *__n): __name(__n) { }
private:
/// Assigning type_info is not supported.
type_info& operator=(const type_info&);
type_info(const type_info&);
};
/**
@ -141,9 +139,11 @@ namespace std
{
public:
bad_cast() throw() { }
// This declaration is not useless:
// http://gcc.gnu.org/onlinedocs/gcc-3.0.2/gcc_6.html#SEC118
virtual ~bad_cast() throw();
// See comment in eh_exception.cc.
virtual const char* what() const throw();
};
@ -153,9 +153,11 @@ namespace std
{
public:
bad_typeid () throw() { }
// This declaration is not useless:
// http://gcc.gnu.org/onlinedocs/gcc-3.0.2/gcc_6.html#SEC118
virtual ~bad_typeid() throw();
// See comment in eh_exception.cc.
virtual const char* what() const throw();
};