Commit bd1a56a0 by Benjamin Kosnik Committed by Benjamin Kosnik

libstdc++.exp: Check CXXFLAGS.

2007-09-06  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/lib/libstdc++.exp: Check CXXFLAGS.
	* scripts/testsuite_flags.in: CXXFLAGS_default, matching dejagnu.

	* include/std/ostream: Spacing tweak.
	* include/ext/hashtable.h: Use <algorithm>.
	* include/ext/slist: Same.
	* include/ext/rope: Same.
	* include/bits/stl_function.h: Format.
	* include/tr1_impl/array: Remove section number in doxygen markup.
	* src/list.cc: Comment tweak.	
	
	* docs/doxygen/user.cfg.in: Update for include/tr1_impl.
	
	* testsuite/25_algorithms/search_n/iterator.cc: Add using declaration.
	* testsuite/25_algorithms/nth_element/1.cc:  Same.
	* testsuite/21_strings/char_traits/requirements/short/1.cc: Use
	char_type typedef to the underlying character type.	
	* testsuite/21_strings/char_traits/requirements/wchar_t/typedefs.cc:
	Remove -ansi -pedantic-errors.
	* testsuite/21_strings/char_traits/requirements/char/typedefs.cc: Same.
	* testsuite/tr1/6_containers/headers/functional/synopsis.cc:
	Remove specializations.

From-SVN: r128225
parent 62a4a967
2007-09-06 Benjamin Kosnik <bkoz@redhat.com>
* testsuite/lib/libstdc++.exp: Check CXXFLAGS.
* scripts/testsuite_flags.in: CXXFLAGS_default, matching dejagnu.
* include/std/ostream: Spacing tweak.
* include/ext/hashtable.h: Use <algorithm>.
* include/ext/slist: Same.
* include/ext/rope: Same.
* include/bits/stl_function.h: Format.
* include/tr1_impl/array: Remove section number in doxygen markup.
* src/list.cc: Comment tweak.
* docs/doxygen/user.cfg.in: Update for include/tr1_impl.
* testsuite/25_algorithms/search_n/iterator.cc: Add using declaration.
* testsuite/25_algorithms/nth_element/1.cc: Same.
* testsuite/21_strings/char_traits/requirements/short/1.cc: Use
char_type typedef to the underlying character type.
* testsuite/21_strings/char_traits/requirements/wchar_t/typedefs.cc:
Remove -ansi -pedantic-errors.
* testsuite/21_strings/char_traits/requirements/char/typedefs.cc: Same.
* testsuite/tr1/6_containers/headers/functional/synopsis.cc:
Remove specializations.
2007-09-06 Paolo Carlini <pcarlini@suse.de> 2007-09-06 Paolo Carlini <pcarlini@suse.de>
* include/bits/stl_vector.h (_Vector_base<>::_M_allocate): * include/bits/stl_vector.h (_Vector_base<>::_M_allocate):
......
...@@ -60,6 +60,9 @@ ...@@ -60,6 +60,9 @@
/* Define to 1 if you have the <dlfcn.h> header file. */ /* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H #undef HAVE_DLFCN_H
/* Define if EBADMSG exists. */
#undef HAVE_EBADMSG
/* Define to 1 if you have the <endian.h> header file. */ /* Define to 1 if you have the <endian.h> header file. */
#undef HAVE_ENDIAN_H #undef HAVE_ENDIAN_H
......
...@@ -300,7 +300,7 @@ INTERNAL_DOCS = NO ...@@ -300,7 +300,7 @@ INTERNAL_DOCS = NO
# in case and if your file system supports case sensitive file names. Windows # in case and if your file system supports case sensitive file names. Windows
# and Mac users are advised to set this option to NO. # and Mac users are advised to set this option to NO.
CASE_SENSE_NAMES = NO# CASE_SENSE_NAMES = NO
# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen # If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
# will show members with their full class and namespace scopes in the # will show members with their full class and namespace scopes in the
...@@ -480,6 +480,7 @@ INPUT = @srcdir@/docs/doxygen/doxygroups.cc \ ...@@ -480,6 +480,7 @@ INPUT = @srcdir@/docs/doxygen/doxygroups.cc \
include/debug \ include/debug \
include/ext \ include/ext \
include/tr1 \ include/tr1 \
include/tr1_impl \
include/algorithm \ include/algorithm \
include/array \ include/array \
include/bitset \ include/bitset \
...@@ -580,7 +581,7 @@ INPUT = @srcdir@/docs/doxygen/doxygroups.cc \ ...@@ -580,7 +581,7 @@ INPUT = @srcdir@/docs/doxygen/doxygroups.cc \
include/tr1/cwchar \ include/tr1/cwchar \
include/tr1/cwctype \ include/tr1/cwctype \
include/tr1/functional \ include/tr1/functional \
include/tr1/hashtable \ include/tr1/hashtable.h \
include/tr1/memory \ include/tr1/memory \
include/tr1/random \ include/tr1/random \
include/tr1/regex \ include/tr1/regex \
...@@ -588,7 +589,26 @@ INPUT = @srcdir@/docs/doxygen/doxygroups.cc \ ...@@ -588,7 +589,26 @@ INPUT = @srcdir@/docs/doxygen/doxygroups.cc \
include/tr1/type_traits \ include/tr1/type_traits \
include/tr1/unordered_map \ include/tr1/unordered_map \
include/tr1/unordered_set \ include/tr1/unordered_set \
include/tr1/utility include/tr1_impl/utility \
include/tr1_impl/array \
include/tr1_impl/cctype \
include/tr1_impl/cfenv \
include/tr1_impl/cinttypes \
include/tr1_impl/cmath \
include/tr1_impl/complex \
include/tr1_impl/cstdint \
include/tr1_impl/cstdio \
include/tr1_impl/cstdlib \
include/tr1_impl/cwchar \
include/tr1_impl/cwctype \
include/tr1_impl/functional \
include/tr1_impl/random \
include/tr1_impl/regex \
include/tr1_impl/tuple \
include/tr1_impl/type_traits \
include/tr1_impl/unordered_map \
include/tr1_impl/unordered_set \
include/tr1_impl/utility
# If the value of the INPUT tag contains directories, you can use the # If the value of the INPUT tag contains directories, you can use the
# FILE_PATTERNS tag to specify one or more wildcard pattern (like # FILE_PATTERNS tag to specify one or more wildcard pattern (like
...@@ -1284,8 +1304,7 @@ UML_LOOK = NO ...@@ -1284,8 +1304,7 @@ UML_LOOK = NO
# If set to YES, the inheritance and collaboration graphs will show the # If set to YES, the inheritance and collaboration graphs will show the
# relations between templates and their instances. # relations between templates and their instances.
#TEMPLATE_RELATIONS = YES TEMPLATE_RELATIONS = YES
TEMPLATE_RELATIONS = NO
# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
# tags are set to YES then doxygen will generate a graph for each documented # tags are set to YES then doxygen will generate a graph for each documented
......
// Hashtable implementation used by containers -*- C++ -*- // Hashtable implementation used by containers -*- C++ -*-
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
// Free Software Foundation, Inc. // Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // This file is part of the GNU ISO C++ Library. This library is free
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
#include <vector> #include <vector>
#include <iterator> #include <iterator>
#include <bits/stl_algo.h> #include <algorithm>
#include <bits/stl_function.h> #include <bits/stl_function.h>
#include <ext/hash_fun.h> #include <ext/hash_fun.h>
......
...@@ -49,15 +49,14 @@ ...@@ -49,15 +49,14 @@
#ifndef _ROPE #ifndef _ROPE
#define _ROPE 1 #define _ROPE 1
#include <bits/stl_algobase.h> #include <algorithm>
#include <iosfwd>
#include <bits/stl_construct.h> #include <bits/stl_construct.h>
#include <bits/stl_uninitialized.h> #include <bits/stl_uninitialized.h>
#include <bits/stl_algo.h>
#include <bits/stl_function.h> #include <bits/stl_function.h>
#include <bits/stl_numeric.h> #include <bits/stl_numeric.h>
#include <bits/allocator.h> #include <bits/allocator.h>
#include <ext/hash_fun.h> #include <ext/hash_fun.h>
#include <iosfwd>
#include <bits/gthr.h> #include <bits/gthr.h>
# ifdef __GC # ifdef __GC
......
// Singly-linked list implementation -*- C++ -*- // Singly-linked list implementation -*- C++ -*-
// Copyright (C) 2001, 2002, 2004, 2005 Free Software Foundation, Inc. // Copyright (C) 2001, 2002, 2004, 2005, 2007 Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // 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 // software; you can redistribute it and/or modify it under the
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
#ifndef _SLIST #ifndef _SLIST
#define _SLIST 1 #define _SLIST 1
#include <bits/stl_algobase.h> #include <algorithm>
#include <bits/allocator.h> #include <bits/allocator.h>
#include <bits/stl_construct.h> #include <bits/stl_construct.h>
#include <bits/stl_uninitialized.h> #include <bits/stl_uninitialized.h>
......
...@@ -539,7 +539,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) ...@@ -539,7 +539,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
template<typename _CharT, typename _Traits> template<typename _CharT, typename _Traits>
inline basic_ostream<_CharT, _Traits>& inline basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __out, const error_code& __e) operator<<(basic_ostream<_CharT, _Traits>& __out, const error_code& __e)
{ return (__out << __e.category().name().c_str() << ':' << __e.value()); } { return (__out << __e.category().name().c_str() << ':' << __e.value()); }
#endif #endif
// [27.6.2.7] standard basic_ostream manipulators // [27.6.2.7] standard basic_ostream manipulators
......
...@@ -36,7 +36,7 @@ namespace std ...@@ -36,7 +36,7 @@ namespace std
{ {
_GLIBCXX_BEGIN_NAMESPACE_TR1 _GLIBCXX_BEGIN_NAMESPACE_TR1
/// @brief struct array [6.2.2]. /// @brief struct array.
/// NB: Requires complete type _Tp. /// NB: Requires complete type _Tp.
template<typename _Tp, std::size_t _Nm> template<typename _Tp, std::size_t _Nm>
struct array struct array
......
...@@ -54,10 +54,9 @@ case ${query} in ...@@ -54,10 +54,9 @@ case ${query} in
echo ${CC} echo ${CC}
;; ;;
--cxxflags) --cxxflags)
CXXFLAGS_save="-g -O2 -D_GLIBCXX_ASSERT" CXXFLAGS_default="-g -O2 -D_GLIBCXX_ASSERT -fmessage-length=0"
CXXFLAGS_config='@SECTION_FLAGS@ -fmessage-length=0 CXXFLAGS_config="@SECTION_FLAGS@ @CXXFLAGS@ @EXTRA_CXX_FLAGS@"
@CXXFLAGS@ @EXTRA_CXX_FLAGS@ ' echo ${CXXFLAGS_default} ${CXXFLAGS_config}
echo ${CXXFLAGS_save} ${CXXFLAGS_config}
;; ;;
--cxxpchflags) --cxxpchflags)
PCHFLAGS="@glibcxx_PCHFLAGS@" PCHFLAGS="@glibcxx_PCHFLAGS@"
......
...@@ -115,7 +115,9 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD) ...@@ -115,7 +115,9 @@ _GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD)
do do
{ {
std::swap(__tmp->_M_next, __tmp->_M_prev); std::swap(__tmp->_M_next, __tmp->_M_prev);
__tmp = __tmp->_M_prev; // Old next node is now prev.
// Old next node is now prev.
__tmp = __tmp->_M_prev;
} }
while (__tmp != this); while (__tmp != this);
} }
......
// { dg-do compile } // { dg-do compile }
// { dg-options "-ansi -pedantic-errors" }
// 2001-02-11 gdr // 2001-02-11 gdr
// Origin: Craig Rodrigues <rodrigc@mediaone.net> // Origin: Craig Rodrigues <rodrigc@mediaone.net>
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
void test02(void) void test02(void)
{ {
typedef short char_type;
bool test __attribute__((unused)) = true; bool test __attribute__((unused)) = true;
// 21.1.1 character traits requirements // 21.1.1 character traits requirements
...@@ -45,67 +46,67 @@ void test02(void) ...@@ -45,67 +46,67 @@ void test02(void)
// pos == X::pos_type // pos == X::pos_type
// state == X::state_type // state == X::state_type
// void X::assign(short c, short d) // void X::assign(char_type c, char_type d)
// assigns c = d; // assigns c = d;
short c1 = 'z'; char_type c1 = 'z';
short c2 = 'u'; char_type c2 = 'u';
VERIFY( c1 != c2 ); VERIFY( c1 != c2 );
std::char_traits<short>::assign(c1,c2); std::char_traits<char_type>::assign(c1,c2);
VERIFY( c1 == 'u' ); VERIFY( c1 == 'u' );
// bool X::eq(short c, short d) // bool X::eq(char_type c, char_type d)
c1 = 'z'; c1 = 'z';
c2 = 'u'; c2 = 'u';
VERIFY ( !std::char_traits<short>::eq(c1, c2) ); VERIFY ( !std::char_traits<char_type>::eq(c1, c2) );
VERIFY ( std::char_traits<short>::eq(c1, c1) ); VERIFY ( std::char_traits<char_type>::eq(c1, c1) );
VERIFY ( std::char_traits<short>::eq(c2, c2) ); VERIFY ( std::char_traits<char_type>::eq(c2, c2) );
// bool X::lt(short c, short d) // bool X::lt(char_type c, char_type d)
c1 = 'z'; c1 = 'z';
c2 = 'u'; c2 = 'u';
VERIFY ( std::char_traits<short>::lt(c2, c1) ); VERIFY ( std::char_traits<char_type>::lt(c2, c1) );
VERIFY ( !std::char_traits<short>::lt(c1, c2) ); VERIFY ( !std::char_traits<char_type>::lt(c1, c2) );
VERIFY ( !std::char_traits<short>::lt(c1, c1) ); VERIFY ( !std::char_traits<char_type>::lt(c1, c1) );
VERIFY ( !std::char_traits<short>::lt(c2, c2) ); VERIFY ( !std::char_traits<char_type>::lt(c2, c2) );
// short* X::move(short* s, const short* p, size_t n) // char_type* X::move(char_type* s, const char_type* p, size_t n)
// for each i in [0,n) performs X::assign(s[i], p[i]). Copies // for each i in [0,n) performs X::assign(s[i], p[i]). Copies
// correctly even where p is in [s, s + n), and yields s. // correctly even where p is in [s, s + n), and yields s.
short array1[] = {'z', 'u', 'm', 'a', ' ', 'b', 'e', 'a', 'c', 'h', 0}; char_type array1[] = {'z', 'u', 'm', 'a', ' ', 'b', 'e', 'a', 'c', 'h', 0};
const std::basic_string<short> str_01(array1 + 0, array1 + 10); const std::basic_string<char_type> str_01(array1 + 0, array1 + 10);
const short str_lit1[] = {'m', 'o', 'n', 't', 'a', 'r', 'a', ' ', 'a', 'n', 'd', ' ', 'o', 'c', 'e', 'a', 'n', ' ', 'b', 'e', 'a', 'c', 'h', 0}; const char_type str_lit1[] = {'m', 'o', 'n', 't', 'a', 'r', 'a', ' ', 'a', 'n', 'd', ' ', 'o', 'c', 'e', 'a', 'n', ' ', 'b', 'e', 'a', 'c', 'h', 0};
int len = sizeof(str_lit1)/sizeof(short) + sizeof(array1)/sizeof(short) - 1; int len = sizeof(str_lit1)/sizeof(char_type) + sizeof(array1)/sizeof(char_type) - 1;
// two terminating chars // two terminating chars
short array3[] = {'b', 'o', 'r', 'a', 'c', 'a', 'y', ',', ' ', 'p', 'h', 'i', 'l', 'i', 'p', 'p', 'i', 'n', 'e', 's', 0}; char_type array3[] = {'b', 'o', 'r', 'a', 'c', 'a', 'y', ',', ' ', 'p', 'h', 'i', 'l', 'i', 'p', 'p', 'i', 'n', 'e', 's', 0};
short array2[len]; char_type array2[len];
std::char_traits<short>::copy(array2, array3, len); std::char_traits<char_type>::copy(array2, array3, len);
VERIFY( str_lit1[0] == 'm' ); VERIFY( str_lit1[0] == 'm' );
c1 = array2[0]; c1 = array2[0];
c2 = str_lit1[0]; c2 = str_lit1[0];
short c3 = array2[1]; char_type c3 = array2[1];
short c4 = str_lit1[1]; char_type c4 = str_lit1[1];
std::char_traits<short>::move(array2, str_lit1, 0); std::char_traits<char_type>::move(array2, str_lit1, 0);
VERIFY( array2[0] == c1 ); VERIFY( array2[0] == c1 );
VERIFY( str_lit1[0] == c2 ); VERIFY( str_lit1[0] == c2 );
std::char_traits<short>::move(array2, str_lit1, 1); std::char_traits<char_type>::move(array2, str_lit1, 1);
VERIFY( array2[0] == c2 ); VERIFY( array2[0] == c2 );
VERIFY( str_lit1[0] == c2 ); VERIFY( str_lit1[0] == c2 );
VERIFY( array2[1] == c3 ); VERIFY( array2[1] == c3 );
VERIFY( str_lit1[1] == c4 ); VERIFY( str_lit1[1] == c4 );
std::char_traits<short>::move(array2, str_lit1, 2); std::char_traits<char_type>::move(array2, str_lit1, 2);
VERIFY( array2[0] == c2 ); VERIFY( array2[0] == c2 );
VERIFY( str_lit1[0] == c2 ); VERIFY( str_lit1[0] == c2 );
VERIFY( array2[1] == c4 ); VERIFY( array2[1] == c4 );
VERIFY( str_lit1[1] == c4 ); VERIFY( str_lit1[1] == c4 );
short* pc1 = array1 + 1; char_type* pc1 = array1 + 1;
c1 = pc1[0]; c1 = pc1[0];
c2 = array1[0]; c2 = array1[0];
VERIFY( c1 != c2 ); VERIFY( c1 != c2 );
short* pc2 = std::char_traits<short>::move(array1, pc1, 0); char_type* pc2 = std::char_traits<char_type>::move(array1, pc1, 0);
c3 = pc1[0]; c3 = pc1[0];
c4 = array1[0]; c4 = array1[0];
VERIFY( c1 == c3 ); VERIFY( c1 == c3 );
...@@ -114,11 +115,11 @@ void test02(void) ...@@ -114,11 +115,11 @@ void test02(void)
c1 = pc1[0]; c1 = pc1[0];
c2 = array1[0]; c2 = array1[0];
short* pc3 = pc1; char_type* pc3 = pc1;
pc2 = std::char_traits<short>::move(array1, pc1, 10); pc2 = std::char_traits<char_type>::move(array1, pc1, 10);
c3 = pc1[0]; c3 = pc1[0];
c4 = array1[0]; c4 = array1[0];
VERIFY( c1 != c3 ); // underlying short array changed. VERIFY( c1 != c3 ); // underlying char_type array changed.
VERIFY( c4 != c3 ); VERIFY( c4 != c3 );
VERIFY( pc2 == array1 ); VERIFY( pc2 == array1 );
VERIFY( pc3 == pc1 ); // but pointers o-tay VERIFY( pc3 == pc1 ); // but pointers o-tay
...@@ -126,49 +127,47 @@ void test02(void) ...@@ -126,49 +127,47 @@ void test02(void)
c2 = array1[0]; c2 = array1[0];
VERIFY( c1 != c2 ); VERIFY( c1 != c2 );
// size_t X::length(const short* p) // size_t X::length(const char_type* p)
len = std::char_traits<short>::length(str_lit1); len = std::char_traits<char_type>::length(str_lit1);
VERIFY( len == sizeof(str_lit1) / sizeof(short) - 1 ); VERIFY( len == sizeof(str_lit1) / sizeof(char_type) - 1 );
// const short* X::find(const short* s, size_t n, short c) // const char_type* X::find(const char_type* s, size_t n, char_type c)
const int N4 = sizeof(str_lit1) / sizeof(short); const int N4 = sizeof(str_lit1) / sizeof(char_type);
const short* pc4 = std::char_traits<short>::find(str_lit1, N4, 'a'); const char_type* pc4 = std::char_traits<char_type>::find(str_lit1, N4, 'a');
VERIFY( pc4 != 0 ); VERIFY( pc4 != 0 );
VERIFY( *pc4 == 'a' ); VERIFY( *pc4 == 'a' );
pc4 = std::char_traits<short>::find(str_lit1, N4, 0x0a73); pc4 = std::char_traits<char_type>::find(str_lit1, N4, 0x0a73);
VERIFY( pc4 == 0 ); VERIFY( pc4 == 0 );
// short* X::assign(short* s, size_t n, short c) // char_type* X::assign(char_type* s, size_t n, char_type c)
len = sizeof(array2) / sizeof(short); len = sizeof(array2) / sizeof(char_type);
std::memset(array2, 0xaf, len * sizeof(short)); std::memset(array2, 0xaf, len * sizeof(char_type));
VERIFY( array2[0] != 0x15a8 ); VERIFY( array2[0] != 0x15a8 );
pc1 = std::char_traits<short>::assign (array2, len, 0x15a8); pc1 = std::char_traits<char_type>::assign (array2, len, 0x15a8);
VERIFY( pc1 == array2 ); VERIFY( pc1 == array2 );
for (int i = 0; i < len; ++i) for (int i = 0; i < len; ++i)
VERIFY( array2[i] == 0x15a8 ); VERIFY( array2[i] == 0x15a8 );
// short* X::copy(short* s, const short* p, size_t n) // char_type* X::copy(char_type* s, const char_type* p, size_t n)
int n1 = sizeof(str_lit1) / sizeof(short); int n1 = sizeof(str_lit1) / sizeof(char_type);
pc1 = std::char_traits<short>::copy(array2, str_lit1, n1); pc1 = std::char_traits<char_type>::copy(array2, str_lit1, n1);
len = std::char_traits<short>::length(array2); len = std::char_traits<char_type>::length(array2);
VERIFY( len == n1 - 1 ); VERIFY( len == n1 - 1 );
for (int i = 0; i < len; ++i) for (int i = 0; i < len; ++i)
VERIFY( str_lit1[i] == array2[i] ); VERIFY( str_lit1[i] == array2[i] );
// int X::compare(const short* p, const short* q, size_t n) // int X::compare(const char_type* p, const char_type* q, size_t n)
const short* pconst1 = str_01.data(); const char_type* pconst1 = str_01.data();
const short* pconst2 = str_lit1; const char_type* pconst2 = str_lit1;
VERIFY( std::char_traits<short>::compare(pconst1, pconst2, 10) > 0 ); VERIFY( std::char_traits<char_type>::compare(pconst1, pconst2, 10) > 0 );
VERIFY( std::char_traits<short>::compare(pconst2, pconst1, 10) < 0 ); VERIFY( std::char_traits<char_type>::compare(pconst2, pconst1, 10) < 0 );
VERIFY( std::char_traits<short>::compare(pconst1, pconst1, 10) == 0 ); VERIFY( std::char_traits<char_type>::compare(pconst1, pconst1, 10) == 0 );
VERIFY( std::char_traits<short>::compare(pconst2, pconst2, 10) == 0 ); VERIFY( std::char_traits<char_type>::compare(pconst2, pconst2, 10) == 0 );
} }
int main() int main()
{ {
test02(); test02();
......
// { dg-do compile } // { dg-do compile }
// { dg-options "-ansi -pedantic-errors" }
// 2001-02-11 gdr // 2001-02-11 gdr
// Origin: Craig Rodrigues <rodrigc@mediaone.net> // Origin: Craig Rodrigues <rodrigc@mediaone.net>
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
using __gnu_test::test_container; using __gnu_test::test_container;
using __gnu_test::random_access_iterator_wrapper; using __gnu_test::random_access_iterator_wrapper;
using std::nth_element; using std::nth_element;
using std::partial_sort;
typedef test_container<int, random_access_iterator_wrapper> Container; typedef test_container<int, random_access_iterator_wrapper> Container;
......
...@@ -52,12 +52,15 @@ lexstep(int* start, int length) ...@@ -52,12 +52,15 @@ lexstep(int* start, int length)
return !carry; return !carry;
} }
using __gnu_test::test_container; int main()
using __gnu_test::random_access_iterator_wrapper; {
using __gnu_test::bidirectional_iterator_wrapper; using __gnu_test::test_container;
using __gnu_test::forward_iterator_wrapper; using __gnu_test::random_access_iterator_wrapper;
using __gnu_test::bidirectional_iterator_wrapper;
using __gnu_test::forward_iterator_wrapper;
using std::search_n;
int main() {
test_container<int,forward_iterator_wrapper> con(array1,array1 + 10); test_container<int,forward_iterator_wrapper> con(array1,array1 + 10);
VERIFY(search_n(con.end(), con.end(), 0, 1) == con.end()); VERIFY(search_n(con.end(), con.end(), 0, 1) == con.end());
VERIFY(search_n(con.end(), con.end(), 1, 1) == con.end()); VERIFY(search_n(con.end(), con.end(), 1, 1) == con.end());
......
...@@ -171,13 +171,6 @@ proc libstdc++_init { testfile } { ...@@ -171,13 +171,6 @@ proc libstdc++_init { testfile } {
set compiler [transform "g++"] set compiler [transform "g++"]
} }
# Default settings.
set cxx [transform "g++"]
set cxxflags "-g -O2 -D_GLIBCXX_ASSERT -fmessage-length=0"
set cxxldflags ""
set cc [transform "gcc"]
# Locate testsuite_hooks.h and other testsuite headers.
set includes "-I${srcdir}/util"
# Adapt the defaults for special circumstances. # Adapt the defaults for special circumstances.
if [is_remote host] { if [is_remote host] {
# A remote host does not, in general, have access to the # A remote host does not, in general, have access to the
...@@ -206,6 +199,12 @@ proc libstdc++_init { testfile } { ...@@ -206,6 +199,12 @@ proc libstdc++_init { testfile } {
return "untested" return "untested"
} }
} }
# Default settings.
set cxx [transform "g++"]
set cxxflags "-g -O2 -D_GLIBCXX_ASSERT -fmessage-length=0 "
set cxxldflags ""
set cc [transform "gcc"]
# Locate testsuite_hooks.h and other testsuite headers.
set includes "-Iutil" set includes "-Iutil"
} elseif { [file exists $flags_file] } { } elseif { [file exists $flags_file] } {
# If we find a testsuite_flags file, we're testing in the build dir. # If we find a testsuite_flags file, we're testing in the build dir.
...@@ -215,6 +214,9 @@ proc libstdc++_init { testfile } { ...@@ -215,6 +214,9 @@ proc libstdc++_init { testfile } {
set cc [exec sh $flags_file --build-cc] set cc [exec sh $flags_file --build-cc]
set includes [exec sh $flags_file --build-includes] set includes [exec sh $flags_file --build-includes]
} }
append cxxflags " "
append cxxflags [getenv CXXFLAGS]
v3track cxxflags 2
# Always use MO files built by this test harness. # Always use MO files built by this test harness.
set cxxflags "$cxxflags -DLOCALEDIR=\".\"" set cxxflags "$cxxflags -DLOCALEDIR=\".\""
...@@ -830,7 +832,6 @@ proc check_v3_target_namedlocale { } { ...@@ -830,7 +832,6 @@ proc check_v3_target_namedlocale { } {
proc check_v3_target_debug_mode { } { proc check_v3_target_debug_mode { } {
global cxxflags global cxxflags
global et_debug_mode global et_debug_mode
global tool global tool
if { ![info exists et_debug_mode_target_name] } { if { ![info exists et_debug_mode_target_name] } {
......
...@@ -29,24 +29,5 @@ namespace tr1 { ...@@ -29,24 +29,5 @@ namespace tr1 {
// [6.3.3] Hash function base template // [6.3.3] Hash function base template
template <class T> struct hash; template <class T> struct hash;
// Hash function specializations
template <> struct hash<bool>;
template <> struct hash<char>;
template <> struct hash<signed char>;
template <> struct hash<unsigned char>;
template <> struct hash<wchar_t>;
template <> struct hash<short>;
template <> struct hash<unsigned short>;
template <> struct hash<int>;
template <> struct hash<unsigned int>;
template <> struct hash<long>;
template <> struct hash<unsigned long>;
template <> struct hash<float>;
template <> struct hash<double>;
template <> struct hash<long double>;
template<class T> struct hash<T*>;
template <> struct hash<std::string>;
template <> struct hash<std::wstring>;
} // namespace tr1 } // namespace tr1
} // namespace std } // namespace std
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment