]> gcc.gnu.org Git - gcc.git/commitdiff
5.cc: Don't use stdc++.h.gch.
authorBenjamin Kosnik <bkoz@redhat.com>
Mon, 22 Dec 2003 20:09:23 +0000 (20:09 +0000)
committerBenjamin Kosnik <bkoz@gcc.gnu.org>
Mon, 22 Dec 2003 20:09:23 +0000 (20:09 +0000)
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.

From-SVN: r74946

libstdc++-v3/ChangeLog
libstdc++-v3/config/linker-map.gnu
libstdc++-v3/docs/html/test.html
libstdc++-v3/include/bits/ios_base.h
libstdc++-v3/scripts/testsuite_flags.in
libstdc++-v3/src/ios_init.cc
libstdc++-v3/testsuite/27_io/ios_base/cons/assign_neg.cc
libstdc++-v3/testsuite/27_io/ios_base/cons/copy_neg.cc
libstdc++-v3/testsuite/27_io/objects/char/5.cc
libstdc++-v3/testsuite/27_io/objects/wchar_t/5.cc
libstdc++-v3/testsuite/libstdc++-dg/normal.exp

index 2f240b86576b16ce19ba6000a4027665b1c4d72d..06deeb102de9c14cb24acd0568e1fad340c6fe69 100644 (file)
@@ -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
index 2ae6742227f658bdb67e034050bd14db0830de1a..7931953705811d4f9b7074bece71b8b937dac199 100644 (file)
@@ -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]*;
index 6fb2c3a2498692aa77679aaabb5c9f43c92429ef..8c761113eb6ba453c3c9f034f9ba9cb4625123dc 100644 (file)
@@ -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>
index ee6405070f752aea9a0e1bd5f6784d1f9df571d7..587bda4b0928d0c884c3f09e655f01d08548bbdb 100644 (file)
@@ -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;
index b260ce4ea0d604d81600b5682ee75b3bda87a092..f66082e2fae97240953e8112aa7aa502fd21518a 100755 (executable)
@@ -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
 
index 4f8ab7bf324e8391c8363044e69ed143bb3a4965..b40202553e53a4fd6795fec70df5f68068891476 100644 (file)
@@ -142,12 +142,6 @@ namespace std
       }
   } 
 
-  bool
-  ios_base::Init::_S_initialized()
-  {
-    return _S_refcount > 0;
-  }
-
   bool 
   ios_base::sync_with_stdio(bool __sync)
   { 
index 3261c07be9c300c6accfe3fb09d0b7e7ae882ef0..6e80b878fd5d5187f153dd61c8607d40984de93a 100644 (file)
@@ -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 } 
index 5f8871fa5c9a78254eb6be4b5ab7545d51670181..b4cf359d3ac0a57e5ce1516bcac466ce6231fed6 100644 (file)
@@ -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 } 
index da93e83e1271a58e5843c55df0ec46d32b5267bd..acf8d6d3f0a0261d6429ee6e64e7b9d340b847f6 100644 (file)
@@ -1,3 +1,4 @@
+// { dg-options "-D_GLIBCXX_ASSERT" { target *-*-* } }
 // 2003-04-26 Petur Runolfsson  <peturr02@ru.is>
 
 // Copyright (C) 2003 Free Software Foundation
index 318598f5e9d96b6401d3c78908e3903c03cd272f..ed6f317325644b44b8fd4ac0c60fc88e09dac8f2 100644 (file)
@@ -1,3 +1,4 @@
+// { dg-options "-D_GLIBCXX_ASSERT" { target *-*-* } }
 // 2003-05-01 Petur Runolfsson  <peturr02@ru.is>
 
 // Copyright (C) 2003 Free Software Foundation
index d6f4490b2b9b8c8511a9a06f6eeec75cd2bfc321..a5665438aa523084972c4d26827905a94da67c55 100644 (file)
 
 # 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
This page took 0.083568 seconds and 5 git commands to generate.