aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/testsuite/23_containers
diff options
context:
space:
mode:
authorBenjamin Kosnik <bkoz@redhat.com>2004-01-07 20:55:06 +0000
committerBenjamin Kosnik <bkoz@redhat.com>2004-01-07 20:55:06 +0000
commit540ab700d58d9f43cd947adf5488627bd7a0cf01 (patch)
treeed69c0f62c1780d04db24bca830ea61d1a7e875e /libstdc++-v3/testsuite/23_containers
parent8f71bfbeea3fbeaa744bc10c783259145a1f28e0 (diff)
2004-01-07 Gawain Bolton <gp.bolton@computer.org>
* include/bits/stl_list.h: * include/bits/list.tc: * src/list.cc: Performance enhancements for destructor, push_front(), push_back(), pop_front(), pop_back(), sort() Eliminated static_casts where possible. Moved code out of header files into new src/list.cc implementation file for library where possible. Remove inheritance from iterator class and create separate classes for non-constant and constant iterators. * include/bits/stl_tree.h (_Rb_tree class): * src/tree.cc: Only erase contents in destructor. Eliminate unnecessary initialization in assignment operator. Optimize for the nominal case by not checking whether container is empty in clear(). Re-order test in _M_insert() to improve performance. Move initialization of new node's left & right pointers to src/tree.cc to where new node's colour is initialized and to reduce the amount of inline code. Use _M_leftmost() and _M_end() to improve readability where appropriate. Create separate classes for non-constant and constant iterators to clarify code, avoid extra template parameters and casting away constness. 2004-01-07 Benjamin Kosnik <bkoz@redhat.com> * src/Makefile.am (sources): Add list.cc, tree.cc. * src/stl_tree.cc: Move to... * src/tree.cc: ...here. * src/list.cc: Add. * config/linker-map.gnu: Tweaks. * testsuite/23_containers/map/operators/1_neg.cc: Add excess errors. * testsuite/23_containers/set/operators/1_neg.cc: Add excess errors. * bits/stl_vector.h: Column wrap comments. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@75515 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/testsuite/23_containers')
-rw-r--r--libstdc++-v3/testsuite/23_containers/map/operators/1_neg.cc14
-rw-r--r--libstdc++-v3/testsuite/23_containers/set/operators/1_neg.cc14
2 files changed, 12 insertions, 16 deletions
diff --git a/libstdc++-v3/testsuite/23_containers/map/operators/1_neg.cc b/libstdc++-v3/testsuite/23_containers/map/operators/1_neg.cc
index f105f9b91a5..84302328b4d 100644
--- a/libstdc++-v3/testsuite/23_containers/map/operators/1_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/map/operators/1_neg.cc
@@ -1,6 +1,6 @@
-// 2000-09-07 bgarcia@laurelnetworks.com
+// { dg-do compile }
-// Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2000, 2001, 2002, 2004 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
@@ -19,12 +19,11 @@
// USA.
// 23.3.4 template class multiset negative tests
+// 2000-09-07 bgarcia@laurelnetworks.com
#include <map>
#include <string>
-// { dg-do compile }
-
// libstdc++/86: map & set iterator comparisons are not type-safe
void test01()
{
@@ -42,8 +41,5 @@ void test01()
test &= itr == mapByName.end(); // { dg-error "no" }
}
-int main()
-{
- test01();
- return 0;
-}
+// { dg-error "candidates are" "" { target *-*-* } 212 }
+// { dg-error "candidates are" "" { target *-*-* } 216 }
diff --git a/libstdc++-v3/testsuite/23_containers/set/operators/1_neg.cc b/libstdc++-v3/testsuite/23_containers/set/operators/1_neg.cc
index 0c620a18b9d..e178b8c3918 100644
--- a/libstdc++-v3/testsuite/23_containers/set/operators/1_neg.cc
+++ b/libstdc++-v3/testsuite/23_containers/set/operators/1_neg.cc
@@ -1,6 +1,6 @@
-// 2000-09-07 bgarcia@laurelnetworks.com
+// { dg-do compile }
-// Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2000, 2001, 2002, 2004 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
@@ -19,14 +19,13 @@
// USA.
// 23.3.4 template class multiset negative tests
+// 2000-09-07 bgarcia@laurelnetworks.com
#include <set>
#include <string>
-// { dg-do compile }
-
// libstdc++/86: map & set iterator comparisons are not type-safe
-int main(void)
+void test01()
{
bool test __attribute__((unused)) = true;
@@ -38,6 +37,7 @@ int main(void)
// NB: it's not setByIndex!!
test &= itr != setByName.end(); // { dg-error "no" }
test &= itr == setByName.end(); // { dg-error "no" }
-
- return 0;
}
+
+// { dg-error "candidates are" "" { target *-*-* } 285 }
+// { dg-error "candidates are" "" { target *-*-* } 289 }