aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libstdc++-v3/ChangeLog16
-rw-r--r--libstdc++-v3/config/linker-map.gnu1
-rw-r--r--libstdc++-v3/docs/html/test.html6
-rw-r--r--libstdc++-v3/include/bits/ios_base.h5
-rwxr-xr-xlibstdc++-v3/scripts/testsuite_flags.in10
-rw-r--r--libstdc++-v3/src/ios_init.cc6
-rw-r--r--libstdc++-v3/testsuite/27_io/ios_base/cons/assign_neg.cc2
-rw-r--r--libstdc++-v3/testsuite/27_io/ios_base/cons/copy_neg.cc2
-rw-r--r--libstdc++-v3/testsuite/27_io/objects/char/5.cc1
-rw-r--r--libstdc++-v3/testsuite/27_io/objects/wchar_t/5.cc1
-rw-r--r--libstdc++-v3/testsuite/libstdc++-dg/normal.exp33
11 files changed, 57 insertions, 26 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 2f240b8..06deeb1 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,19 @@
+2003-12-22 Benjamin Kosnik <bkoz@redhat.com>
+
+ * testsuite/27_io/objects/char/5.cc: Don't use stdc++.h.gch.
+ * testsuite/27_io/objects/wchar_t/5.cc: Same.
+ * docs/html/test.html: Add docs for constructing test files that
+ don't use stdc++.h.gch.
+ * scripts/testsuite_flags.in (PCHFLAGS): Move to --cxxpchflags.
+ * testsuite/libstdc++-dg/normal.exp: Compute DEFAULT_CXXFLAGS
+ differently.
+
+ * include/bits/ios_base.h (ios_base::Init::_S_initialized): Remove.
+ * src/ios_init.cc: Same.
+ * config/linker-map.gnu: Same.
+ * testsuite/27_io/ios_base/cons/copy_neg.cc: Adjust line numbers.
+ * testsuite/27_io/ios_base/cons/assign_neg.cc: Same.
+
2003-12-22 Andrew Pinski <pinskia@physics.uc.edu>
PR libstdc++/13462
diff --git a/libstdc++-v3/config/linker-map.gnu b/libstdc++-v3/config/linker-map.gnu
index 2ae6742..7931953 100644
--- a/libstdc++-v3/config/linker-map.gnu
+++ b/libstdc++-v3/config/linker-map.gnu
@@ -33,7 +33,6 @@ GLIBCXX_3.4 {
std::ios_base::_M_grow_words*;
std::ios_base::_M_init*;
std::ios_base::Init::[A-Za-z]*;
- std::ios_base::Init::_S_initialized*;
std::ios_base::[J-Za-z]*;
std::i[p-z]*;
std::[A-Zj-k]*;
diff --git a/libstdc++-v3/docs/html/test.html b/libstdc++-v3/docs/html/test.html
index 6fb2c3a..8c76111 100644
--- a/libstdc++-v3/docs/html/test.html
+++ b/libstdc++-v3/docs/html/test.html
@@ -392,6 +392,12 @@ Example 3: Testing for expected warnings on line 36
Example 4: Testing for compilation errors on line 41
// { dg-do compile }
// { dg-error "no match for" "" { target *-*-* } 41 }
+
+Example 5: Testing with special command line settings, or without the
+use of pre-compiled headers, in particular the stdc++.h.gch file. Any
+options here will override the DEFAULT_CXXFLAGS set up in the
+normal.exp file.
+// { dg-options "-O0" { target *-*-* } }
</pre>
<p>
diff --git a/libstdc++-v3/include/bits/ios_base.h b/libstdc++-v3/include/bits/ios_base.h
index ee64050..587bda4 100644
--- a/libstdc++-v3/include/bits/ios_base.h
+++ b/libstdc++-v3/include/bits/ios_base.h
@@ -492,11 +492,6 @@ namespace std
Init();
~Init();
- // NB: Allows debugger applications use of the standard streams
- // from operator new.
- static bool
- _S_initialized();
-
private:
static _Atomic_word _S_refcount;
static bool _S_synced_with_stdio;
diff --git a/libstdc++-v3/scripts/testsuite_flags.in b/libstdc++-v3/scripts/testsuite_flags.in
index b260ce4..f66082e 100755
--- a/libstdc++-v3/scripts/testsuite_flags.in
+++ b/libstdc++-v3/scripts/testsuite_flags.in
@@ -17,6 +17,7 @@ Usage:
--build-cxx
--install-cxx
--cxxflags
+ --cxxpchflags
EOF
}
@@ -41,8 +42,7 @@ case ${query} in
echo ${CXX}
;;
--build-cxx)
- PCHFLAGS="@glibcxx_PCHFLAGS@"
- CXX_build="@CXX@ ${PCHFLAGS}"
+ CXX_build="@CXX@"
CXX=`echo "$CXX_build" | sed 's,gcc/xgcc ,gcc/g++ ,'`
echo ${CXX}
;;
@@ -52,8 +52,12 @@ case ${query} in
@EXTRA_CXX_FLAGS@ -DLOCALEDIR="@glibcxx_localedir@" '
echo ${CXXFLAGS_save} ${CXXFLAGS_config}
;;
+ --cxxpchflags)
+ PCHFLAGS="@glibcxx_PCHFLAGS@"
+ echo ${PCHFLAGS}
+ ;;
*)
- print_usage
+ print_usagex
;;
esac
diff --git a/libstdc++-v3/src/ios_init.cc b/libstdc++-v3/src/ios_init.cc
index 4f8ab7b..b402025 100644
--- a/libstdc++-v3/src/ios_init.cc
+++ b/libstdc++-v3/src/ios_init.cc
@@ -142,12 +142,6 @@ namespace std
}
}
- bool
- ios_base::Init::_S_initialized()
- {
- return _S_refcount > 0;
- }
-
bool
ios_base::sync_with_stdio(bool __sync)
{
diff --git a/libstdc++-v3/testsuite/27_io/ios_base/cons/assign_neg.cc b/libstdc++-v3/testsuite/27_io/ios_base/cons/assign_neg.cc
index 3261c07..6e80b87 100644
--- a/libstdc++-v3/testsuite/27_io/ios_base/cons/assign_neg.cc
+++ b/libstdc++-v3/testsuite/27_io/ios_base/cons/assign_neg.cc
@@ -41,5 +41,5 @@ void test01()
io1 = io2;
}
// { dg-error "within this context" "" { target *-*-* } 41 }
-// { dg-error "is private" "" { target *-*-* } 745 }
+// { dg-error "is private" "" { target *-*-* } 740 }
// { dg-error "operator=" "" { target *-*-* } 0 }
diff --git a/libstdc++-v3/testsuite/27_io/ios_base/cons/copy_neg.cc b/libstdc++-v3/testsuite/27_io/ios_base/cons/copy_neg.cc
index 5f8871f..b4cf359 100644
--- a/libstdc++-v3/testsuite/27_io/ios_base/cons/copy_neg.cc
+++ b/libstdc++-v3/testsuite/27_io/ios_base/cons/copy_neg.cc
@@ -41,5 +41,5 @@ void test02()
test_base io2 = io1;
}
// { dg-error "within this context" "" { target *-*-* } 41 }
-// { dg-error "is private" "" { target *-*-* } 742 }
+// { dg-error "is private" "" { target *-*-* } 737 }
// { dg-error "copy constructor" "" { target *-*-* } 0 }
diff --git a/libstdc++-v3/testsuite/27_io/objects/char/5.cc b/libstdc++-v3/testsuite/27_io/objects/char/5.cc
index da93e83..acf8d6d 100644
--- a/libstdc++-v3/testsuite/27_io/objects/char/5.cc
+++ b/libstdc++-v3/testsuite/27_io/objects/char/5.cc
@@ -1,3 +1,4 @@
+// { dg-options "-D_GLIBCXX_ASSERT" { target *-*-* } }
// 2003-04-26 Petur Runolfsson <peturr02@ru.is>
// Copyright (C) 2003 Free Software Foundation
diff --git a/libstdc++-v3/testsuite/27_io/objects/wchar_t/5.cc b/libstdc++-v3/testsuite/27_io/objects/wchar_t/5.cc
index 318598f..ed6f317 100644
--- a/libstdc++-v3/testsuite/27_io/objects/wchar_t/5.cc
+++ b/libstdc++-v3/testsuite/27_io/objects/wchar_t/5.cc
@@ -1,3 +1,4 @@
+// { dg-options "-D_GLIBCXX_ASSERT" { target *-*-* } }
// 2003-05-01 Petur Runolfsson <peturr02@ru.is>
// Copyright (C) 2003 Free Software Foundation
diff --git a/libstdc++-v3/testsuite/libstdc++-dg/normal.exp b/libstdc++-v3/testsuite/libstdc++-dg/normal.exp
index d6f4490..a566543 100644
--- a/libstdc++-v3/testsuite/libstdc++-dg/normal.exp
+++ b/libstdc++-v3/testsuite/libstdc++-dg/normal.exp
@@ -16,21 +16,36 @@
# libstdc++-v3 testsuite that uses the 'dg.exp' driver.
-global target_triplet
+# Initialization.
+dg-init
+v3-init
-# If a testcase doesn't have special options, use these.
+# If a libstdc++ test file doesn't have special options, use DEFAULT_CXXFLAGS.
+# Use this variable if the behavior
+# 1) only applies to libstdc++ testing
+# 2) might need to be negated
+# In particular, some tests have to be run without precompiled
+# headers, or without assertions.
+global blddir
+global target_triplet
global DEFAULT_CXXFLAGS
if ![info exists DEFAULT_CXXFLAGS] then {
- if { [string match "powerpc-*-darwin*" $target_triplet] } {
- set DEFAULT_CXXFLAGS "-D_GLIBCXX_ASSERT -multiply_defined suppress"
+ set DEFAULT_CXXFLAGS "-D_GLIBCXX_ASSERT"
+
+ # Set up includes for stdc++.h.gch, the precompiled header file.
+ set flags_file "${blddir}/scripts/testsuite_flags"
+ if { [file exists $flags_file] } {
+ set cxxpchflags [exec sh $flags_file --cxxpchflags]
} else {
- set DEFAULT_CXXFLAGS "-D_GLIBCXX_ASSERT"
+ set cxxpchflags ""
}
-}
+ append DEFAULT_CXXFLAGS " ${cxxpchflags}"
-# Initialization.
-dg-init
-v3-init
+ # Host specific goo here.
+ if { [string match "powerpc-*-darwin*" $target_triplet] } {
+ append DEFAULT_CXXFLAGS " -multiply_defined suppress"
+ }
+}
# Main loop.
dg-runtest [v3-list-tests testsuite_files] "" $DEFAULT_CXXFLAGS