diff options
Diffstat (limited to 'libstdc++-v3/testsuite')
129 files changed, 417 insertions, 386 deletions
diff --git a/libstdc++-v3/testsuite/18_support/bad_exception/23591_thread-1.c b/libstdc++-v3/testsuite/18_support/bad_exception/23591_thread-1.c index 9e621c3..f6c6230 100644 --- a/libstdc++-v3/testsuite/18_support/bad_exception/23591_thread-1.c +++ b/libstdc++-v3/testsuite/18_support/bad_exception/23591_thread-1.c @@ -1,7 +1,7 @@ // { dg-require-sharedlib "" } // { dg-options "-g -O2 -pthread -ldl -x c" { target *-*-linux* } } -// Copyright (C) 2005, 2009 Free Software Foundation, Inc. +// Copyright (C) 2005, 2009, 2010 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 @@ -32,20 +32,20 @@ static void* run(void* arg) void (*cb)(); lib = dlopen("./testsuite_shared.so", RTLD_NOW); - if (lib == NULL) + if (!lib) { printf("dlopen failed: %s\n", strerror(errno)); - return NULL; + return 0; } cb = (function_type) dlsym(lib, "try_throw_exception"); - if (cb == NULL) + if (!cb) { printf("dlsym failed: %s\n", strerror(errno)); - return NULL; + return 0; } cb(); dlclose(lib); - return NULL; + return 0; } // libstdc++/23591 @@ -53,9 +53,9 @@ int main(void) { pthread_t pt; - if (pthread_create(&pt, NULL, &run, NULL) != 0) + if (pthread_create(&pt, 0, &run, 0) != 0) return 1; - if (pthread_join(pt, NULL) != 0) + if (pthread_join(pt, 0) != 0) return 1; return 0; diff --git a/libstdc++-v3/testsuite/18_support/new_delete_placement.cc b/libstdc++-v3/testsuite/18_support/new_delete_placement.cc index ef845d3..866a89b 100644 --- a/libstdc++-v3/testsuite/18_support/new_delete_placement.cc +++ b/libstdc++-v3/testsuite/18_support/new_delete_placement.cc @@ -1,6 +1,6 @@ // 2002-07-24 Benjamin Kosnik -// Copyright (C) 2002, 2004, 2009 Free Software Foundation +// Copyright (C) 2002, 2004, 2009, 2010 Free Software Foundation // // 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 @@ -27,7 +27,7 @@ void test01() { void* pc = new char; void* pa = new char[10]; - void* tmp = NULL; + void* tmp = 0; operator delete(pc, tmp); operator delete[](pa, tmp); } diff --git a/libstdc++-v3/testsuite/18_support/pthread_guard.cc b/libstdc++-v3/testsuite/18_support/pthread_guard.cc index 965328e..5389316 100644 --- a/libstdc++-v3/testsuite/18_support/pthread_guard.cc +++ b/libstdc++-v3/testsuite/18_support/pthread_guard.cc @@ -1,5 +1,5 @@ // -// Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc. +// Copyright (C) 2007, 2008, 2009, 2010 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 @@ -40,7 +40,7 @@ void* do_something (void *arg) { static int bar __attribute__((unused)) = get_bar (); - return NULL; + return 0; } int @@ -48,10 +48,10 @@ get_foo (void) { pthread_t new_thread; - if (pthread_create (&new_thread, NULL, do_something, NULL) != 0) + if (pthread_create (&new_thread, 0, do_something, 0) != 0) std::abort (); - if (pthread_join (new_thread, NULL) != 0) + if (pthread_join (new_thread, 0) != 0) std::abort (); return 1; diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/5.cc b/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/5.cc index 73839d2..5652478 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/5.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/5.cc @@ -1,6 +1,6 @@ // 1999-06-04 bkoz -// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2009 +// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -33,7 +33,7 @@ void test05() std::string empty2(empty.begin(), empty.end()); // libstdc++/8716 (same underlying situation, same fix) - char const * s = NULL; + char const * s = 0; std::string zero_length_built_with_NULL(s,0); } diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/5.cc b/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/5.cc index 4fe58b6..e72377d 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/5.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/5.cc @@ -1,6 +1,6 @@ // 1999-06-04 bkoz -// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2009 +// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -33,7 +33,7 @@ void test05() std::wstring empty2(empty.begin(), empty.end()); // libstdc++/8716 (same underlying situation, same fix) - wchar_t const * s = NULL; + wchar_t const * s = 0; std::wstring zero_length_built_with_NULL(s,0); } diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/operations/char/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/operations/char/1.cc index c39f6b4..de0fe16 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/operations/char/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/operations/char/1.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2004, 2009 Free Software Foundation, Inc. +// Copyright (C) 2004, 2009, 2010 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 @@ -29,7 +29,7 @@ int test01(void) // data() for size == 0 is non-NULL. VERIFY( empty.size() == 0 ); const std::string::value_type* p = empty.data(); - VERIFY( p != NULL ); + VERIFY( p ); return 0; } diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/operations/wchar_t/1.cc b/libstdc++-v3/testsuite/21_strings/basic_string/operations/wchar_t/1.cc index 1ddde92..a57464a 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/operations/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/operations/wchar_t/1.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2004, 2009 Free Software Foundation, Inc. +// Copyright (C) 2004, 2009, 2010 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 @@ -29,7 +29,7 @@ int test01(void) // data() for size == 0 is non-NULL. VERIFY( empty.size() == 0 ); const std::wstring::value_type* p = empty.data(); - VERIFY( p != NULL ); + VERIFY( p ); return 0; } diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/pthread4.cc b/libstdc++-v3/testsuite/21_strings/basic_string/pthread4.cc index fb48898..b3dc9b2 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/pthread4.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/pthread4.cc @@ -2,7 +2,7 @@ // Adapted from http://gcc.gnu.org/ml/gcc-bugs/2002-01/msg00679.html // which was adapted from pthread1.cc by Mike Lu <MLu@dynamicsoft.com> // -// Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2009 +// Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -95,12 +95,12 @@ main (void) #endif pthread_t prod; - pthread_create (&prod, NULL, produce, NULL); + pthread_create (&prod, 0, produce, 0); pthread_t cons; - pthread_create (&cons, NULL, consume, NULL); + pthread_create (&cons, 0, consume, 0); - pthread_join (prod, NULL); - pthread_join (cons, NULL); + pthread_join (prod, 0); + pthread_join (cons, 0); return 0; } diff --git a/libstdc++-v3/testsuite/22_locale/ctype/is/char/1.cc b/libstdc++-v3/testsuite/22_locale/ctype/is/char/1.cc index 4a96797..2df9553 100644 --- a/libstdc++-v3/testsuite/22_locale/ctype/is/char/1.cc +++ b/libstdc++-v3/testsuite/22_locale/ctype/is/char/1.cc @@ -1,4 +1,5 @@ -// Copyright (C) 2000, 2001, 2002, 2003, 2009 Free Software Foundation, Inc. +// Copyright (C) 2000, 2001, 2002, 2003, 2009, 2010 +// 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 @@ -84,8 +85,8 @@ void test01() std::ctype_base::mask m01[3]; std::ctype_base::mask m02[13]; const char_type* cc0 = strlit00; - const char_type* cc1 = NULL; - const char_type* cc2 = NULL; + const char_type* cc1 = 0; + const char_type* cc2 = 0; cc0 = strlit00; for (std::size_t i = 0; i < 3; ++i) diff --git a/libstdc++-v3/testsuite/22_locale/ctype/is/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/ctype/is/wchar_t/1.cc index cf2f845..0b989cb 100644 --- a/libstdc++-v3/testsuite/22_locale/ctype/is/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/22_locale/ctype/is/wchar_t/1.cc @@ -1,4 +1,5 @@ -// Copyright (C) 2000, 2001, 2002, 2003, 2009 Free Software Foundation, Inc. +// Copyright (C) 2000, 2001, 2002, 2003, 2009, 2010 +// 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 @@ -84,8 +85,8 @@ void test01() std::ctype_base::mask m01[3]; std::ctype_base::mask m02[13]; const char_type* cc0 = strlit00; - const char_type* cc1 = NULL; - const char_type* cc2 = NULL; + const char_type* cc1 = 0; + const char_type* cc2 = 0; cc0 = strlit00; for (std::size_t i = 0; i < 3; ++i) diff --git a/libstdc++-v3/testsuite/22_locale/locale/cons/12658_thread-1.cc b/libstdc++-v3/testsuite/22_locale/locale/cons/12658_thread-1.cc index d7ad841..f36559e 100644 --- a/libstdc++-v3/testsuite/22_locale/locale/cons/12658_thread-1.cc +++ b/libstdc++-v3/testsuite/22_locale/locale/cons/12658_thread-1.cc @@ -3,7 +3,7 @@ // { dg-options "-pthreads" { target *-*-solaris* } } // { dg-require-namedlocale "" } -// Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation +// Copyright (C) 2004, 2005, 2007, 2009, 2010 Free Software Foundation // // 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 @@ -59,10 +59,10 @@ main() pthread_t tid[max_thread_count]; for (int i = 0; i < max_thread_count; i++) - pthread_create (&tid[i], NULL, thread_main, 0); + pthread_create (&tid[i], 0, thread_main, 0); for (int i = 0; i < max_thread_count; i++) - pthread_join (tid[i], NULL); + pthread_join (tid[i], 0); return 0; } diff --git a/libstdc++-v3/testsuite/22_locale/locale/cons/2.cc b/libstdc++-v3/testsuite/22_locale/locale/cons/2.cc index c5c70dc..c09b000 100644 --- a/libstdc++-v3/testsuite/22_locale/locale/cons/2.cc +++ b/libstdc++-v3/testsuite/22_locale/locale/cons/2.cc @@ -2,7 +2,8 @@ // 2000-09-13 Benjamin Kosnik <bkoz@redhat.com> -// Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009 +// Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, +// 2009, 2010 // Free Software Foundation // // This file is part of the GNU ISO C++ Library. This library is free @@ -96,7 +97,7 @@ void test01() VERIFY( loc07 != loc02 ); VERIFY( loc07.name() != "" ); try - { locale loc08(static_cast<const char*>(NULL)); } + { locale loc08(static_cast<const char*>(0)); } catch(runtime_error& obj) { VERIFY( true ); } catch(...) @@ -130,7 +131,7 @@ void test01() VERIFY( loc11 == loc01 ); try - { locale loc12(loc01, static_cast<const char*>(NULL), locale::ctype); } + { locale loc12(loc01, static_cast<const char*>(0), locale::ctype); } catch(runtime_error& obj) { VERIFY( true ); } catch(...) @@ -178,7 +179,7 @@ void test01() VERIFY( loc11 == loc01 ); try - { locale loc12(loc01, static_cast<const char*>(NULL), locale::ctype); } + { locale loc12(loc01, static_cast<const char*>(0), locale::ctype); } catch(runtime_error& obj) { VERIFY( true ); } catch(...) diff --git a/libstdc++-v3/testsuite/22_locale/locale/cons/29217.cc b/libstdc++-v3/testsuite/22_locale/locale/cons/29217.cc index 428efc9..6693f5d 100644 --- a/libstdc++-v3/testsuite/22_locale/locale/cons/29217.cc +++ b/libstdc++-v3/testsuite/22_locale/locale/cons/29217.cc @@ -1,6 +1,6 @@ // { dg-require-namedlocale "" } -// Copyright (C) 2006, 2009 Free Software Foundation +// Copyright (C) 2006, 2009, 2010 Free Software Foundation // // 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 @@ -36,7 +36,7 @@ void test01() "LC_PAPER=C;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;" "LC_MEASUREMENT=C;LC_IDENTIFICATION=C" ); - VERIFY( locale().name() == setlocale(LC_ALL, NULL) ); + VERIFY( locale().name() == setlocale(LC_ALL, 0) ); locale loc1 = locale(locale::classic(), "en_US.UTF-8", locale::time); diff --git a/libstdc++-v3/testsuite/22_locale/locale/global_locale_objects/14071.cc b/libstdc++-v3/testsuite/22_locale/locale/global_locale_objects/14071.cc index 4927e56..30e133f 100644 --- a/libstdc++-v3/testsuite/22_locale/locale/global_locale_objects/14071.cc +++ b/libstdc++-v3/testsuite/22_locale/locale/global_locale_objects/14071.cc @@ -2,7 +2,7 @@ // 2004-02-09 Petur Runolfsson <peturr02@ru.is> -// Copyright (C) 2004, 2005, 2009 Free Software Foundation +// Copyright (C) 2004, 2005, 2009, 2010 Free Software Foundation // // 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 @@ -39,7 +39,7 @@ void test01() if (loc.name() != "*") { locale::global(loc); - VERIFY( loc.name() == setlocale(LC_ALL, NULL) ); + VERIFY( loc.name() == setlocale(LC_ALL, 0) ); } } diff --git a/libstdc++-v3/testsuite/22_locale/locale/global_locale_objects/2.cc b/libstdc++-v3/testsuite/22_locale/locale/global_locale_objects/2.cc index 21d52fd..3265f71 100644 --- a/libstdc++-v3/testsuite/22_locale/locale/global_locale_objects/2.cc +++ b/libstdc++-v3/testsuite/22_locale/locale/global_locale_objects/2.cc @@ -2,7 +2,7 @@ // 2000-09-13 Benjamin Kosnik <bkoz@redhat.com> -// Copyright (C) 2000, 2002, 2003, 2005, 2009 Free Software Foundation +// Copyright (C) 2000, 2002, 2003, 2005, 2009, 2010 Free Software Foundation // // 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 @@ -33,7 +33,7 @@ void test02() const string ph("en_PH"); const string mx("es_MX"); - const char* orig = setlocale(LC_ALL, NULL); + const char* orig = setlocale(LC_ALL, 0); const char* testph = setlocale(LC_ALL, ph.c_str()); const char* testmx = setlocale(LC_ALL, mx.c_str()); setlocale(LC_ALL, orig); @@ -54,7 +54,7 @@ void test02() // Change global locale. locale global_orig = locale::global(loc_mx); - const char* lc_all_mx = setlocale(LC_ALL, NULL); + const char* lc_all_mx = setlocale(LC_ALL, 0); if (lc_all_mx) { VERIFY( mx == lc_all_mx ); diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/12439_1.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/12439_1.cc index 7de5471..3c6ad92 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/12439_1.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/12439_1.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2003, 2009 Free Software Foundation +// Copyright (C) 2003, 2009, 2010 Free Software Foundation // // 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 @@ -47,7 +47,7 @@ void test01() bool test __attribute__((unused)) = true; ostringstream stream; - time_t tt = time(NULL); + time_t tt = time(0); const char* fmt = "%c"; diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/12439_3.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/12439_3.cc index 54d4cde..3d19d36 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/12439_3.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/12439_3.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2003, 2009 Free Software Foundation +// Copyright (C) 2003, 2009, 2010 Free Software Foundation // // 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 @@ -46,7 +46,7 @@ void test03() bool test __attribute__((unused)) = true; ostringstream stream; - time_t tt = time(NULL); + time_t tt = time(0); const char* fmt = "%c"; diff --git a/libstdc++-v3/testsuite/23_containers/list/23781.cc b/libstdc++-v3/testsuite/23_containers/list/23781.cc index ca275bd..7b291df 100644 --- a/libstdc++-v3/testsuite/23_containers/list/23781.cc +++ b/libstdc++-v3/testsuite/23_containers/list/23781.cc @@ -1,6 +1,6 @@ // 2005-09-10 Paolo Carlini <pcarlini@suse.de> // -// Copyright (C) 2005, 2009 Free Software Foundation, Inc. +// Copyright (C) 2005, 2009, 2010 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 @@ -22,6 +22,7 @@ // libstdc++/23781 #include <list> +#include <cstddef> typedef std::list<int> list_type; list_type::iterator it = NULL; // { dg-error "conversion" } diff --git a/libstdc++-v3/testsuite/23_containers/list/pthread1.cc b/libstdc++-v3/testsuite/23_containers/list/pthread1.cc index fcbb039..7a1de4d 100644 --- a/libstdc++-v3/testsuite/23_containers/list/pthread1.cc +++ b/libstdc++-v3/testsuite/23_containers/list/pthread1.cc @@ -1,6 +1,6 @@ // 2002-01-23 Loren J. Rittle <rittle@labs.mot.com> <ljrittle@acm.org> // -// Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2009 +// Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -31,6 +31,7 @@ #include <list> #include <cstdlib> +#include <cstddef> #include <pthread.h> const int thread_cycles = 10; diff --git a/libstdc++-v3/testsuite/23_containers/map/23781.cc b/libstdc++-v3/testsuite/23_containers/map/23781.cc index f796769..e282c75 100644 --- a/libstdc++-v3/testsuite/23_containers/map/23781.cc +++ b/libstdc++-v3/testsuite/23_containers/map/23781.cc @@ -1,6 +1,6 @@ // 2005-09-10 Paolo Carlini <pcarlini@suse.de> // -// Copyright (C) 2005, 2009 Free Software Foundation, Inc. +// Copyright (C) 2005, 2009, 2010 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 @@ -22,6 +22,7 @@ // libstdc++/23781 #include <map> +#include <cstddef> std::map<int, int>::iterator it = NULL; // { dg-error "conversion" } std::map<int, int>::const_iterator cit = NULL; // { dg-error "conversion" } diff --git a/libstdc++-v3/testsuite/23_containers/map/pthread6.cc b/libstdc++-v3/testsuite/23_containers/map/pthread6.cc index 608527e..8680ebb 100644 --- a/libstdc++-v3/testsuite/23_containers/map/pthread6.cc +++ b/libstdc++-v3/testsuite/23_containers/map/pthread6.cc @@ -1,7 +1,7 @@ // 2002-01-23 Loren J. Rittle <rittle@labs.mot.com> <ljrittle@acm.org> // Adpated from libstdc++/5444 submitted by markus.breuer@materna.de // -// Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2009 +// Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -26,6 +26,7 @@ #include <string> #include <map> #include <vector> +#include <cstddef> #include <pthread.h> const int max_thread_count = 8; diff --git a/libstdc++-v3/testsuite/23_containers/multimap/23781.cc b/libstdc++-v3/testsuite/23_containers/multimap/23781.cc index 912bb92..50ec929 100644 --- a/libstdc++-v3/testsuite/23_containers/multimap/23781.cc +++ b/libstdc++-v3/testsuite/23_containers/multimap/23781.cc @@ -1,6 +1,6 @@ // 2005-09-10 Paolo Carlini <pcarlini@suse.de> // -// Copyright (C) 2005, 2009 Free Software Foundation, Inc. +// Copyright (C) 2005, 2009, 2010 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 @@ -22,6 +22,7 @@ // libstdc++/23781 #include <map> +#include <cstddef> std::multimap<int, int>::iterator it = NULL; // { dg-error "conversion" } std::multimap<int, int>::const_iterator cit = NULL; // { dg-error "conversion" } diff --git a/libstdc++-v3/testsuite/23_containers/multiset/23781.cc b/libstdc++-v3/testsuite/23_containers/multiset/23781.cc index 80d1337..6b0bacf 100644 --- a/libstdc++-v3/testsuite/23_containers/multiset/23781.cc +++ b/libstdc++-v3/testsuite/23_containers/multiset/23781.cc @@ -1,6 +1,6 @@ // 2005-09-10 Paolo Carlini <pcarlini@suse.de> // -// Copyright (C) 2005, 2009 Free Software Foundation, Inc. +// Copyright (C) 2005, 2009, 2010 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 @@ -22,6 +22,7 @@ // libstdc++/23781 #include <set> +#include <cstddef> std::multiset<int>::iterator it = NULL; // { dg-error "conversion" } std::multiset<int>::const_iterator cit = NULL; // { dg-error "conversion" } diff --git a/libstdc++-v3/testsuite/23_containers/set/23781.cc b/libstdc++-v3/testsuite/23_containers/set/23781.cc index 7a2a2bc..b47b748 100644 --- a/libstdc++-v3/testsuite/23_containers/set/23781.cc +++ b/libstdc++-v3/testsuite/23_containers/set/23781.cc @@ -1,6 +1,6 @@ // 2005-09-10 Paolo Carlini <pcarlini@suse.de> // -// Copyright (C) 2005, 2009 Free Software Foundation, Inc. +// Copyright (C) 2005, 2009, 2010 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 @@ -22,6 +22,7 @@ // libstdc++/23781 #include <set> +#include <cstddef> std::set<int>::iterator it = NULL; // { dg-error "conversion" } std::set<int>::const_iterator cit = NULL; // { dg-error "conversion" } diff --git a/libstdc++-v3/testsuite/24_iterators/ostreambuf_iterator/2.cc b/libstdc++-v3/testsuite/24_iterators/ostreambuf_iterator/2.cc index 36d8add..0b86efa 100644 --- a/libstdc++-v3/testsuite/24_iterators/ostreambuf_iterator/2.cc +++ b/libstdc++-v3/testsuite/24_iterators/ostreambuf_iterator/2.cc @@ -1,6 +1,6 @@ // 2001-04-30 Benjamin Kosnik <bkoz@redhat.com> -// Copyright (C) 2001, 2003, 2009 Free Software Foundation, Inc. +// Copyright (C) 2001, 2003, 2009, 2010 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 @@ -49,7 +49,7 @@ bool test02(void) *ostrb_it01; VERIFY( !ostrb_it01.failed() ); - costreambuf_iter ostrb_it02(NULL); + costreambuf_iter ostrb_it02(0); VERIFY( ostrb_it02.failed() ); ostrb_it02++; ++ostrb_it02; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/1.cc index 6dc56f9..0a12e72 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/1.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2001, 2002, 2003, 2009 Free Software Foundation, Inc. +// Copyright (C) 2001, 2002, 2003, 2009, 2010 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 @@ -61,19 +61,19 @@ void test_01() // filebuf_type* close() std::filebuf* f; f = fb_01.close(); - VERIFY( f != NULL ); + VERIFY( f ); VERIFY( !fb_01.is_open() ); f = fb_02.close(); - VERIFY( f != NULL ); + VERIFY( f ); VERIFY( !fb_02.is_open() ); f = fb_03.close(); - VERIFY( f != NULL ); + VERIFY( f ); VERIFY( !fb_03.is_open() ); f = fb_03.close(); - VERIFY( f == NULL ); + VERIFY( !f ); VERIFY( !fb_03.is_open() ); } diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/12790-3.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/12790-3.cc index 2074ee7..fe0624d 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/12790-3.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/12790-3.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2003, 2009 Free Software Foundation, Inc. +// Copyright (C) 2003, 2009, 2010 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 @@ -71,7 +71,7 @@ void test01() VERIFY( !cvt->unshift_called ); filebuf* ret = fb.close(); VERIFY( cvt->unshift_called ); - VERIFY( ret == NULL ); + VERIFY( !ret ); } int main() diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/2.cc index 9d0cb0f..c1a0f79 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/2.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/2.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2001, 2002, 2003, 2009 Free Software Foundation, Inc. +// Copyright (C) 2001, 2002, 2003, 2009, 2010 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 @@ -48,7 +48,7 @@ void test_02() // read (ext) FILE* f2 = fopen(name_01, "r"); - VERIFY( f2 != NULL ); + VERIFY( f2 ); if (f2) { __gnu_cxx::stdio_filebuf<char> fb(f2, std::ios_base::in, 512); @@ -58,7 +58,7 @@ void test_02() // read (standard) FILE* f = fopen(name_01, "r"); - VERIFY( f != NULL ); + VERIFY( f ); if (f) { std::ifstream ifstream1(name_01); diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/9964.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/9964.cc index e520682..f2c5abc 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/9964.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/9964.cc @@ -1,7 +1,7 @@ // { dg-require-fork "" } // { dg-require-mkfifo "" } -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009 +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -69,14 +69,14 @@ bool test_07() filebuf fb; filebuf* ret = fb.open(name, ios_base::in | ios_base::out); - VERIFY( ret != NULL ); + VERIFY( ret != 0 ); VERIFY( fb.is_open() ); s1.signal(); s2.wait(); fb.sputc('a'); ret = fb.close(); - VERIFY( ret != NULL ); + VERIFY( ret != 0 ); VERIFY( !fb.is_open() ); return test; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/close/wchar_t/12790-3.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/close/wchar_t/12790-3.cc index baa4ed3..417fbc2 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/close/wchar_t/12790-3.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/close/wchar_t/12790-3.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2003, 2009 Free Software Foundation, Inc. +// Copyright (C) 2003, 2009, 2010 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 @@ -69,7 +69,7 @@ void test01() VERIFY( !cvt->unshift_called ); wfilebuf* ret = fb.close(); VERIFY( cvt->unshift_called ); - VERIFY( ret == NULL ); + VERIFY( !ret ); } int main() diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/14975-2.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/14975-2.cc index a3a7812..b233f65 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/14975-2.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/14975-2.cc @@ -4,7 +4,8 @@ // 2004-04-16 Petur Runolfsson <peturr02@ru.is> -// Copyright (C) 2004, 2005, 2006, 2007, 2009 Free Software Foundation, Inc. +// Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010 +// 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 @@ -68,7 +69,7 @@ bool test01() wfilebuf fb; fb.pubimbue(loc_us); wfilebuf* ret = fb.open(name, ios_base::out); - VERIFY( ret != NULL ); + VERIFY( ret != 0 ); VERIFY( fb.is_open() ); s1.wait(); diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/open/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/open/char/1.cc index e10bd91..1a40da1 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/open/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/open/char/1.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2001, 2002, 2003, 2009 Free Software Foundation, Inc. +// Copyright (C) 2001, 2002, 2003, 2009, 2010 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 @@ -53,11 +53,11 @@ void test_01() // Should keep the old file attached, and disregard attempt to overthrow. std::filebuf* f = fb_02.open(name_02, std::ios_base::in | std::ios_base::out | std::ios_base::trunc); - VERIFY( f != NULL ); + VERIFY( f ); VERIFY( fb_02.is_open() ); f = fb_02.open(name_03, std::ios_base::in | std::ios_base::out); - VERIFY( f == NULL ); + VERIFY( !f ); VERIFY( fb_02.is_open() ); fb_03.open(name_03, std::ios_base::out | std::ios_base::trunc); diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/open/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/open/char/2.cc index 1bd81ee..755784f 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/open/char/2.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/open/char/2.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2001, 2002, 2003, 2009 Free Software Foundation, Inc. +// Copyright (C) 2001, 2002, 2003, 2009, 2010 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 @@ -41,7 +41,7 @@ void test_03() int first_fd = ::open(name_01, O_RDONLY); VERIFY( first_fd != -1 ); FILE* first_file = ::fdopen(first_fd, "r"); - VERIFY( first_file != NULL ); + VERIFY( first_file ); __gnu_cxx::stdio_filebuf<char> fb(first_file, std::ios_base::in); int second_fd = fb.fd(); diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/open/char/9507.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/open/char/9507.cc index cfec76b..5b40437 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/open/char/9507.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/open/char/9507.cc @@ -1,6 +1,7 @@ // { dg-require-mkfifo "" } -// Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. +// Copyright (C) 2001, 2002, 2003, 2005, 2009, 2010 +// 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 @@ -55,7 +56,7 @@ void test_06() std::ios_base::in | std::ios_base::out | std::ios_base::ate); - if (r == NULL) + if (!r) VERIFY( !fbuf.is_open() ); else VERIFY( fbuf.is_open() ); diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-1.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-1.cc index db02187..d762fb4 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-1.cc @@ -1,6 +1,6 @@ // { dg-require-namedlocale "" } -// Copyright (C) 2003, 2005, 2009 Free Software Foundation, Inc. +// Copyright (C) 2003, 2005, 2009, 2010 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 @@ -37,7 +37,7 @@ void test01() wfilebuf* f = fb.close(); VERIFY( n1 != wfilebuf::traits_type::eof() ); - VERIFY( f != NULL ); + VERIFY( f ); } int main() diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-2.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-2.cc index 9ea64cc..f11916e 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-2.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-2.cc @@ -1,6 +1,6 @@ // { dg-require-namedlocale "" } -// Copyright (C) 2003, 2005, 2009 Free Software Foundation, Inc. +// Copyright (C) 2003, 2005, 2009, 2010 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 @@ -39,7 +39,7 @@ void test02() VERIFY( n1 != wfilebuf::traits_type::eof() ); VERIFY( n2 != wfilebuf::traits_type::eof() ); - VERIFY( f != NULL ); + VERIFY( f ); } int main() diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-3.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-3.cc index 2f10e0d..2be9b52c 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-3.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-3.cc @@ -1,6 +1,6 @@ // { dg-require-namedlocale "" } -// Copyright (C) 2003, 2005, 2009 Free Software Foundation, Inc. +// Copyright (C) 2003, 2005, 2009, 2010 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 @@ -36,7 +36,7 @@ void test03() wfilebuf* f = fb.close(); VERIFY( n1 != wfilebuf::traits_type::eof() ); - VERIFY( f != NULL ); + VERIFY( f ); } int main() diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-4.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-4.cc index a03d9e8..7b48bfe 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-4.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/overflow/wchar_t/11305-4.cc @@ -1,6 +1,6 @@ // { dg-require-namedlocale "" } -// Copyright (C) 2003, 2005, 2009 Free Software Foundation, Inc. +// Copyright (C) 2003, 2005, 2009, 2010 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 @@ -38,7 +38,7 @@ void test04() VERIFY( n1 != wfilebuf::traits_type::eof() ); VERIFY( n2 != wfilebuf::traits_type::eof() ); - VERIFY( f != NULL ); + VERIFY( f ); } int main() diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/setbuf/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/setbuf/char/1.cc index 3b434ba..42688e8 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/setbuf/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/setbuf/char/1.cc @@ -1,6 +1,6 @@ // 2001-05-21 Benjamin Kosnik <bkoz@redhat.com> -// Copyright (C) 2001, 2002, 2003, 2009 Free Software Foundation, Inc. +// Copyright (C) 2001, 2002, 2003, 2009, 2010 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 @@ -40,8 +40,8 @@ public: check_pointers() { bool test __attribute__((unused)) = true; - test = (this->pbase() == NULL); - test &= (this->pptr() == NULL); + test = (!this->pbase()); + test &= (!this->pptr()); return test; } }; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/1057.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/1057.cc index 4fd2d47..a2368f9 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/1057.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputc/char/1057.cc @@ -1,6 +1,6 @@ // 1999-10-11 bkoz -// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2009 +// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -32,7 +32,7 @@ public: nullsetpbuf() { setp(foo, foo + 64); - setp(NULL, NULL); + setp(0, 0); } }; diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/1057.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/1057.cc index 89ec0e5..c84a079 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/1057.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sputn/char/1057.cc @@ -1,6 +1,6 @@ // 1999-10-11 bkoz -// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2009 +// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -32,7 +32,7 @@ public: nullsetpbuf() { setp(foo, foo + 64); - setp(NULL, NULL); + setp(0, 0); } }; diff --git a/libstdc++-v3/testsuite/27_io/basic_ios/clear/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_ios/clear/char/1.cc index 5ac2cc0..b65d089 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ios/clear/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ios/clear/char/1.cc @@ -1,6 +1,6 @@ // 1999-09-20 bkoz -// Copyright (C) 1999, 2003, 2009 Free Software Foundation, Inc. +// Copyright (C) 1999, 2003, 2009, 2010 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 @@ -35,7 +35,7 @@ void test01() iostate iostate02, iostate03; const iostate iostate01 = std::ios_base::badbit | std::ios_base::eofbit; - std::ios ios_01(NULL); + std::ios ios_01(0); // bool fail() const VERIFY( ios_01.fail() ); diff --git a/libstdc++-v3/testsuite/27_io/basic_ios/copyfmt/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_ios/copyfmt/char/1.cc index 9150d11..0cf07f2 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ios/copyfmt/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ios/copyfmt/char/1.cc @@ -1,6 +1,6 @@ // 1999-09-20 bkoz -// Copyright (C) 1999, 2003, 2009 Free Software Foundation, Inc. +// Copyright (C) 1999, 2003, 2009, 2010 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 @@ -35,8 +35,8 @@ void test02() // basic_ios& copyfmt(const basic_ios& rhs) { - std::ios ios_01(NULL); - std::ios ios_02(NULL); + std::ios ios_01(0); + std::ios ios_02(0); ios_01.exceptions(std::ios_base::eofbit); ios_02.exceptions(std::ios_base::eofbit); @@ -49,8 +49,8 @@ void test02() } { - std::ios ios_01(NULL); - std::ios ios_02(NULL); + std::ios ios_01(0); + std::ios ios_02(0); ios_01.clear(std::ios_base::eofbit); ios_02.exceptions(std::ios_base::eofbit); diff --git a/libstdc++-v3/testsuite/27_io/basic_ios/copyfmt/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_ios/copyfmt/char/2.cc index 0a171a6..79390ea 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ios/copyfmt/char/2.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ios/copyfmt/char/2.cc @@ -2,7 +2,7 @@ // 1999-09-20 bkoz -// Copyright (C) 1999, 2003, 2005, 2009 Free Software Foundation, Inc. +// Copyright (C) 1999, 2003, 2005, 2009, 2010 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 @@ -37,8 +37,8 @@ void test03() typedef std::ios_base::iostate iostate; locale loc_c = locale::classic(); locale loc_de = locale("de_DE"); - std::ios ios_01(NULL); - std::ios ios_02(NULL); + std::ios ios_01(0); + std::ios ios_02(0); ios_01.imbue(loc_c); ios_02.imbue(loc_de); ios_02.setstate(ios_base::badbit); diff --git a/libstdc++-v3/testsuite/27_io/basic_ios/exceptions/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_ios/exceptions/char/1.cc index 03f70c8..f0494bd 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ios/exceptions/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ios/exceptions/char/1.cc @@ -1,6 +1,6 @@ // 1999-09-20 bkoz -// Copyright (C) 1999, 2003, 2009 Free Software Foundation, Inc. +// Copyright (C) 1999, 2003, 2009, 2010 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 @@ -35,13 +35,13 @@ void test01() // iostate exceptions() const iostate iostate02; { - std::ios ios_01(NULL); + std::ios ios_01(0); VERIFY( ios_01.exceptions() == std::ios_base::goodbit ); } // void exceptions(iostate except) { - std::ios ios_01(NULL); + std::ios ios_01(0); try { ios_01.exceptions(std::ios_base::eofbit); } @@ -53,7 +53,7 @@ void test01() } { - std::ios ios_01(NULL); + std::ios ios_01(0); ios_01.clear(std::ios_base::eofbit); try { ios_01.exceptions(std::ios_base::eofbit); diff --git a/libstdc++-v3/testsuite/27_io/basic_ios/locales/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_ios/locales/char/1.cc index 3d5bf77..20de8a9 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ios/locales/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ios/locales/char/1.cc @@ -1,6 +1,6 @@ // 1999-09-20 bkoz -// Copyright (C) 1999, 2003, 2009 Free Software Foundation, Inc. +// Copyright (C) 1999, 2003, 2009, 2010 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 @@ -29,7 +29,7 @@ void test01() bool test __attribute__((unused)) = true; const std::locale c_loc = std::locale::classic(); - std::ios ios_01(NULL); + std::ios ios_01(0); std::ios::char_type ct01; std::ios::char_type ct02('x');; diff --git a/libstdc++-v3/testsuite/27_io/basic_iostream/cons/2020.cc b/libstdc++-v3/testsuite/27_io/basic_iostream/cons/2020.cc index 4aec0e3..44fe413 100644 --- a/libstdc++-v3/testsuite/27_io/basic_iostream/cons/2020.cc +++ b/libstdc++-v3/testsuite/27_io/basic_iostream/cons/2020.cc @@ -1,7 +1,7 @@ // 1999-01-17 bkoz test functionality of basic_filebuf for char_type == char // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, -// 2006, 2007, 2008, 2009 +// 2006, 2007, 2008, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -34,7 +34,7 @@ void test07() try { - gnu_iostr obj(NULL); + gnu_iostr obj(0); } catch(std::exception& obj) { diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/cons/3.cc b/libstdc++-v3/testsuite/27_io/basic_istream/cons/3.cc index 4162f9e..3b2cb84 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/cons/3.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/cons/3.cc @@ -1,6 +1,7 @@ // 1999-01-17 bkoz test functionality of basic_filebuf for char_type == char -// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2009 +// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +// 2005, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -33,7 +34,7 @@ void test07() typedef std::basic_istream<__gnu_test::pod_ushort> gnu_istr; try - { gnu_istr obj(NULL); } + { gnu_istr obj(0); } catch(std::exception& obj) { test = false; diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/01.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/01.cc index 6197515..9f1593e 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/01.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/char/01.cc @@ -1,6 +1,7 @@ // 1999-04-12 bkoz -// Copyright (C) 1999, 2000, 2002, 2003, 2009 Free Software Foundation, Inc. +// Copyright (C) 1999, 2000, 2002, 2003, 2009, 2010 +// 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 @@ -35,7 +36,7 @@ std::stringbuf isbuf_02(str_02, std::ios_base::in); std::stringbuf isbuf_03(str_03, std::ios_base::in); std::stringbuf isbuf_04(str_04, std::ios_base::in); -std::istream is_01(NULL); +std::istream is_01(0); std::istream is_02(&isbuf_02); std::istream is_03(&isbuf_03); std::istream is_04(&isbuf_04); diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/wchar_t/01.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/wchar_t/01.cc index f0d1635..36ddaba 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/wchar_t/01.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_arithmetic/wchar_t/01.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2004, 2009 Free Software Foundation, Inc. +// Copyright (C) 2004, 2009, 2010 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 @@ -33,7 +33,7 @@ std::wstringbuf isbuf_02(str_02, std::ios_base::in); std::wstringbuf isbuf_03(str_03, std::ios_base::in); std::wstringbuf isbuf_04(str_04, std::ios_base::in); -std::wistream is_01(NULL); +std::wistream is_01(0); std::wistream is_02(&isbuf_02); std::wistream is_03(&isbuf_03); std::wistream is_04(&isbuf_04); diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/1.cc index c6fba2f..7e4387d 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/1.cc @@ -1,6 +1,6 @@ // 1999-07-26 bkoz -// Copyright (C) 1999, 2003, 2005, 2009 Free Software Foundation +// Copyright (C) 1999, 2003, 2005, 2009, 2010 Free Software Foundation // // 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 @@ -32,7 +32,7 @@ void test01() std::stringbuf isbuf_01(std::ios_base::in); std::stringbuf isbuf_02(str_02, std::ios_base::in); - std::istream is_01(NULL); + std::istream is_01(0); std::istream is_02(&isbuf_02); std::ios_base::iostate state1, state2, statefail; diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/2.cc index edff030..812d541 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/2.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/2.cc @@ -1,6 +1,6 @@ // 1999-07-26 bkoz -// Copyright (C) 1999, 2003, 2009 Free Software Foundation +// Copyright (C) 1999, 2003, 2009, 2010 Free Software Foundation // // 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 @@ -34,7 +34,7 @@ void test02() std::stringbuf isbuf_01(std::ios_base::in); std::stringbuf isbuf_02(str_02, std::ios_base::in); - std::istream is_01(NULL); + std::istream is_01(0); std::istream is_02(&isbuf_02); std::ios_base::iostate state1, state2, statefail; statefail = std::ios_base::failbit; diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/3.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/3.cc index cfaf5b11..551cb11 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/3.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/3.cc @@ -1,6 +1,6 @@ // 1999-07-26 bkoz -// Copyright (C) 1999, 2003, 2009 Free Software Foundation +// Copyright (C) 1999, 2003, 2009, 2010 Free Software Foundation // // 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 @@ -32,7 +32,7 @@ void test01() std::stringbuf isbuf_01(std::ios_base::in); std::stringbuf isbuf_02(str_02, std::ios_base::in); - std::istream is_01(NULL); + std::istream is_01(0); std::istream is_02(&isbuf_02); std::ios_base::iostate state1, state2, statefail; diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/9826.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/9826.cc index 224d056..a2e480e 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/9826.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/char/9826.cc @@ -1,6 +1,6 @@ // 2002-07-25 Benjamin Kosnik <bkoz@redhat.com> -// Copyright (C) 2002, 2003, 2005, 2009 Free Software Foundation, Inc. +// Copyright (C) 2002, 2003, 2005, 2009, 2010 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 @@ -39,7 +39,7 @@ void test02() sstr >> str; // 2 - pod_char* chr = NULL; + pod_char* chr = 0; sstr >> chr; // 3 diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/wchar_t/1.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/wchar_t/1.cc index 2b42803..f7b749a 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/wchar_t/1.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2004, 2005, 2009 Free Software Foundation +// Copyright (C) 2004, 2005, 2009, 2010 Free Software Foundation // // 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 @@ -30,7 +30,7 @@ void test01() std::wstringbuf isbuf_01(std::ios_base::in); std::wstringbuf isbuf_02(str_02, std::ios_base::in); - std::wistream is_01(NULL); + std::wistream is_01(0); std::wistream is_02(&isbuf_02); std::ios_base::iostate state1, state2, statefail; diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/wchar_t/2.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/wchar_t/2.cc index a684119..a697ef2 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/wchar_t/2.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2004, 2009 Free Software Foundation +// Copyright (C) 2004, 2009, 2010 Free Software Foundation // // 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 @@ -30,7 +30,7 @@ void test02() std::wstringbuf isbuf_01(std::ios_base::in); std::wstringbuf isbuf_02(str_02, std::ios_base::in); - std::wistream is_01(NULL); + std::wistream is_01(0); std::wistream is_02(&isbuf_02); std::ios_base::iostate state1, state2, statefail; statefail = std::ios_base::failbit; diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/wchar_t/3.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/wchar_t/3.cc index 3ba355d..6ea22e3 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_character/wchar_t/3.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2004, 2009 Free Software Foundation +// Copyright (C) 2004, 2009, 2010 Free Software Foundation // // 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 @@ -30,7 +30,7 @@ void test01() std::wstringbuf isbuf_01(std::ios_base::in); std::wstringbuf isbuf_02(str_02, std::ios_base::in); - std::wistream is_01(NULL); + std::wistream is_01(0); std::wistream is_02(&isbuf_02); std::ios_base::iostate state1, state2, statefail; diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/char/1.cc index ecc5082..854dc7c 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/char/1.cc @@ -1,6 +1,7 @@ // 1999-07-28 bkoz -// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 +// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, +// 2009, 2010 // Free Software Foundation // // This file is part of the GNU ISO C++ Library. This library is free @@ -41,7 +42,7 @@ void test01() std::stringbuf isbuf_04(str_02, std::ios_base::in); std::stringbuf isbuf_05(str_02, std::ios_base::in | std::ios_base::out); - std::istream is_00(NULL); + std::istream is_00(0); std::istream is_01(&isbuf_01); std::istream is_02(&isbuf_02); std::istream is_03(&isbuf_03); diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/char/exceptions_null.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/char/exceptions_null.cc index beab22c..96ba719 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/char/exceptions_null.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/char/exceptions_null.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2003, 2009 Free Software Foundation, Inc. +// Copyright (C) 2003, 2009, 2010 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 @@ -28,7 +28,7 @@ void test2() { bool test __attribute__((unused)) = true; istringstream stream; - stream >> static_cast<streambuf*>(NULL); + stream >> static_cast<streambuf*>(0); VERIFY(stream.rdstate() & ios_base::failbit); } @@ -40,7 +40,7 @@ void test4() try { - stream >> static_cast<streambuf*>(NULL); + stream >> static_cast<streambuf*>(0); VERIFY(false); } catch (ios_base::failure&) diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/wchar_t/1.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/wchar_t/1.cc index 809c008..eab6650 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/wchar_t/1.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2004, 2005, 2006, 2009 Free Software Foundation +// Copyright (C) 2004, 2005, 2006, 2009, 2010 Free Software Foundation // // 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 @@ -38,7 +38,7 @@ void test01() std::wstringbuf isbuf_04(str_02, std::ios_base::in); std::wstringbuf isbuf_05(str_02, std::ios_base::in | std::ios_base::out); - std::wistream is_00(NULL); + std::wistream is_00(0); std::wistream is_01(&isbuf_01); std::wistream is_02(&isbuf_02); std::wistream is_03(&isbuf_03); diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/wchar_t/exceptions_null.cc b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/wchar_t/exceptions_null.cc index eddef0a..bc04b7d 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/wchar_t/exceptions_null.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/extractors_other/wchar_t/exceptions_null.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2004, 2009 Free Software Foundation, Inc. +// Copyright (C) 2004, 2009, 2010 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 @@ -28,7 +28,7 @@ void test2() { bool test __attribute__((unused)) = true; wistringstream stream; - stream >> static_cast<wstreambuf*>(NULL); + stream >> static_cast<wstreambuf*>(0); VERIFY( stream.rdstate() & ios_base::failbit ); } @@ -40,7 +40,7 @@ void test4() try { - stream >> static_cast<wstreambuf*>(NULL); + stream >> static_cast<wstreambuf*>(0); VERIFY( false ); } catch (ios_base::failure&) diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/get/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_istream/get/char/1.cc index 19169d9..f7957d8 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/get/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/get/char/1.cc @@ -1,6 +1,7 @@ // 1999-08-11 bkoz -// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2009 Free Software Foundation +// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2009, 2010 +// Free Software Foundation // // 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 @@ -41,7 +42,7 @@ test03() std::stringbuf sbuf_04(str01, std::ios_base::in); std::stringbuf sbuf_05(str01, std::ios_base::in); - std::istream is_00(NULL); + std::istream is_00(0); std::istream is_04(&sbuf_04); std::istream is_05(&sbuf_05); std::ios_base::iostate statefail, stateeof; diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/get/wchar_t/1.cc b/libstdc++-v3/testsuite/27_io/basic_istream/get/wchar_t/1.cc index 7168aef..b3027c3 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/get/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/get/wchar_t/1.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2004, 2009 Free Software Foundation +// Copyright (C) 2004, 2009, 2010 Free Software Foundation // // 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 @@ -39,7 +39,7 @@ test03() std::wstringbuf sbuf_04(str01, std::ios_base::in); std::wstringbuf sbuf_05(str01, std::ios_base::in); - std::wistream is_00(NULL); + std::wistream is_00(0); std::wistream is_04(&sbuf_04); std::wistream is_05(&sbuf_05); std::ios_base::iostate statefail, stateeof; diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/getline/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_istream/getline/char/1.cc index 67b1955..48b245f 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/getline/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/getline/char/1.cc @@ -1,6 +1,7 @@ // 1999-08-11 bkoz -// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2009 Free Software Foundation +// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2009, 2010 +// Free Software Foundation // // 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 @@ -41,7 +42,7 @@ test02() std::stringbuf sbuf_04(str01, std::ios_base::in); - std::istream is_00(NULL); + std::istream is_00(0); std::istream is_04(&sbuf_04); std::ios_base::iostate state1, state2, statefail, stateeof; statefail = std::ios_base::failbit; @@ -54,7 +55,7 @@ test02() is_00.getline(carray1, 20, '*'); state2 = is_00.rdstate(); // make sure failbit was set, since we couldn't extract - // from the NULL streambuf... + // from the null streambuf... VERIFY( state1 != state2 ); VERIFY( static_cast<bool>(state2 & statefail) ); diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/getline/wchar_t/1.cc b/libstdc++-v3/testsuite/27_io/basic_istream/getline/wchar_t/1.cc index 49305a3..2445dd4 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/getline/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/getline/wchar_t/1.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2004, 2009 Free Software Foundation +// Copyright (C) 2004, 2009, 2010 Free Software Foundation // // 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 @@ -39,7 +39,7 @@ test02() std::wstringbuf sbuf_04(str01, std::ios_base::in); - std::wistream is_00(NULL); + std::wistream is_00(0); std::wistream is_04(&sbuf_04); std::ios_base::iostate state1, state2, statefail, stateeof; statefail = std::ios_base::failbit; @@ -52,7 +52,7 @@ test02() is_00.getline(carray1, 20, L'*'); state2 = is_00.rdstate(); // make sure failbit was set, since we couldn't extract - // from the NULL streambuf... + // from the null streambuf... VERIFY( state1 != state2 ); VERIFY( static_cast<bool>(state2 & statefail) ); diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/ignore/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_istream/ignore/char/1.cc index e70c1ab..de0546c 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/ignore/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/ignore/char/1.cc @@ -1,6 +1,7 @@ // 1999-08-11 bkoz -// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2009 Free Software Foundation +// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2009, 2010 +// Free Software Foundation // // 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 @@ -36,7 +37,7 @@ test01() std::stringbuf isbuf_03(str_02, std::ios_base::in); std::stringbuf isbuf_04(str_02, std::ios_base::in); - std::istream is_00(NULL); + std::istream is_00(0); std::istream is_03(&isbuf_03); std::istream is_04(&isbuf_04); std::ios_base::iostate state1, state2, statefail, stateeof; diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/ignore/wchar_t/1.cc b/libstdc++-v3/testsuite/27_io/basic_istream/ignore/wchar_t/1.cc index 6254428..57c827d 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/ignore/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/ignore/wchar_t/1.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2004, 2009 Free Software Foundation +// Copyright (C) 2004, 2009, 2010 Free Software Foundation // // 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 @@ -34,7 +34,7 @@ test01() std::wstringbuf isbuf_03(str_02, std::ios_base::in); std::wstringbuf isbuf_04(str_02, std::ios_base::in); - std::wistream is_00(NULL); + std::wistream is_00(0); std::wistream is_03(&isbuf_03); std::wistream is_04(&isbuf_04); std::ios_base::iostate state1, state2, statefail, stateeof; diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/peek/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_istream/peek/char/1.cc index 6d50164..4b818b2 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/peek/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/peek/char/1.cc @@ -1,6 +1,7 @@ // 1999-08-11 bkoz -// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2009 Free Software Foundation +// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2009, 2010 +// Free Software Foundation // // 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 @@ -36,7 +37,7 @@ test01() std::stringbuf isbuf_03(str_02, std::ios_base::in); std::stringbuf isbuf_04(str_02, std::ios_base::in); - std::istream is_00(NULL); + std::istream is_00(0); std::istream is_03(&isbuf_03); std::istream is_04(&isbuf_04); std::ios_base::iostate state1, state2, statefail, stateeof; diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/peek/wchar_t/1.cc b/libstdc++-v3/testsuite/27_io/basic_istream/peek/wchar_t/1.cc index b4c0e32..8aa4ecf 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/peek/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/peek/wchar_t/1.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2004, 2009 Free Software Foundation +// Copyright (C) 2004, 2009, 2010 Free Software Foundation // // 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 @@ -34,7 +34,7 @@ test01() std::wstringbuf isbuf_03(str_02, std::ios_base::in); std::wstringbuf isbuf_04(str_02, std::ios_base::in); - std::wistream is_00(NULL); + std::wistream is_00(0); std::wistream is_03(&isbuf_03); std::wistream is_04(&isbuf_04); std::ios_base::iostate state1, state2, statefail, stateeof; diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/read/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_istream/read/char/1.cc index b9ebe7d..3879f7b 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/read/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/read/char/1.cc @@ -1,6 +1,6 @@ // 1999-08-11 bkoz -// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2009 +// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2009, 2010 // Free Software Foundation // // This file is part of the GNU ISO C++ Library. This library is free @@ -34,7 +34,7 @@ test01() std::stringbuf isbuf_03(str_02, std::ios_base::in); std::stringbuf isbuf_04(str_02, std::ios_base::in); - std::istream is_00(NULL); + std::istream is_00(0); std::istream is_03(&isbuf_03); std::istream is_04(&isbuf_04); std::ios_base::iostate state1, state2, statefail, stateeof; diff --git a/libstdc++-v3/testsuite/27_io/basic_istream/read/wchar_t/1.cc b/libstdc++-v3/testsuite/27_io/basic_istream/read/wchar_t/1.cc index 1485aa1..508e0c8 100644 --- a/libstdc++-v3/testsuite/27_io/basic_istream/read/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_istream/read/wchar_t/1.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2004, 2009 Free Software Foundation +// Copyright (C) 2004, 2009, 2010 Free Software Foundation // // 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 @@ -31,7 +31,7 @@ test01() std::wstringbuf isbuf_03(str_02, std::ios_base::in); std::wstringbuf isbuf_04(str_02, std::ios_base::in); - std::wistream is_00(NULL); + std::wistream is_00(0); std::wistream is_03(&isbuf_03); std::wistream is_04(&isbuf_04); std::ios_base::iostate state1, state2, statefail, stateeof; diff --git a/libstdc++-v3/testsuite/27_io/basic_ofstream/pthread2.cc b/libstdc++-v3/testsuite/27_io/basic_ofstream/pthread2.cc index 04df562..cb68366 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ofstream/pthread2.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ofstream/pthread2.cc @@ -1,7 +1,7 @@ // 2002-01-23 Loren J. Rittle <rittle@labs.mot.com> <ljrittle@acm.org> // Adpated from libstdc++/5347 submitted by markus.breuer@materna.de // -// Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2009 +// Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -51,10 +51,10 @@ main() #endif for (int i = 0; i < max_thread_count; i++) - pthread_create (&tid[i], NULL, thread_main, 0); + pthread_create (&tid[i], 0, thread_main, 0); for (int i = 0; i < max_thread_count; i++) - pthread_join (tid[i], NULL); + pthread_join (tid[i], 0); return 0; } diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/cons/2020.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/cons/2020.cc index 125440b..07fb7b8 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ostream/cons/2020.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ostream/cons/2020.cc @@ -1,6 +1,7 @@ // 1999-01-17 bkoz test functionality of basic_filebuf for char_type == char -// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2009 +// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, +// 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -34,7 +35,7 @@ void test07() try { - gnu_ostr obj(NULL); + gnu_ostr obj(0); } catch(std::exception& obj) { diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/8.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/8.cc index 85af366..f38e2e7 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/8.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/char/8.cc @@ -1,6 +1,6 @@ // 1999-08-16 bkoz -// Copyright (C) 1999, 2000, 2002, 2003, 2009 Free Software Foundation +// Copyright (C) 1999, 2000, 2002, 2003, 2009, 2010 Free Software Foundation // // 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 @@ -27,7 +27,7 @@ void test08() { bool test __attribute__((unused)) = true; - char* pt = NULL; + char* pt = 0; // 1 std::ostringstream oss; diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/8.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/8.cc index a414076..76490b3 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/8.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_character/wchar_t/8.cc @@ -1,6 +1,6 @@ // 1999-08-16 bkoz -// Copyright (C) 1999, 2000, 2002, 2003, 2009 Free Software Foundation +// Copyright (C) 1999, 2000, 2002, 2003, 2009, 2010 Free Software Foundation // // 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 @@ -27,7 +27,7 @@ void test08() { bool test __attribute__((unused)) = true; - char* pt = NULL; + char* pt = 0; // 2 std::wostringstream woss; @@ -40,7 +40,7 @@ void test08() VERIFY( woss.good() ); // 3 - wchar_t* wt = NULL; + wchar_t* wt = 0; woss.clear(); woss << wt; VERIFY( woss.bad() ); diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/1.cc index c53c160..0c94c68 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/1.cc @@ -1,7 +1,8 @@ // 1999-08-16 bkoz // 1999-11-01 bkoz -// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2009 Free Software Foundation +// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2009, 2010 +// Free Software Foundation // // 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 @@ -46,7 +47,7 @@ test02() // filebuf-> NULL std::ifstream f_in1(name_01); std::ofstream f_out1(name_02); - std::stringbuf* strbuf01 = NULL; + std::stringbuf* strbuf01 = 0; iostate state01 = f_in1.rdstate(); f_in1 >> strbuf01; iostate state02 = f_in1.rdstate(); diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/exceptions_null.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/exceptions_null.cc index 3e5dddc..6d28c5f 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/exceptions_null.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/char/exceptions_null.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2003, 2005, 2009 Free Software Foundation, Inc. +// Copyright (C) 2003, 2005, 2009, 2010 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 @@ -28,7 +28,7 @@ void test1() bool test __attribute__((unused)) = true; ostringstream stream; - stream << static_cast<streambuf*>(NULL); + stream << static_cast<streambuf*>(0); VERIFY( stream.rdstate() & ios_base::badbit ); } @@ -42,7 +42,7 @@ void test3() try { - stream << static_cast<streambuf*>(NULL); + stream << static_cast<streambuf*>(0); VERIFY( false ); } catch (ios_base::failure&) diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/wchar_t/1.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/wchar_t/1.cc index bde6ba5..6e12a65 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/wchar_t/1.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2005, 2009 Free Software Foundation +// Copyright (C) 2005, 2009, 2010 Free Software Foundation // // 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 @@ -41,7 +41,7 @@ test02() // filebuf-> NULL std::wifstream f_in1(name_01); std::wofstream f_out1(name_02); - std::wstringbuf* strbuf01 = NULL; + std::wstringbuf* strbuf01 = 0; iostate state01 = f_in1.rdstate(); f_in1 >> strbuf01; iostate state02 = f_in1.rdstate(); diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/wchar_t/exceptions_null.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/wchar_t/exceptions_null.cc index 7e5cd6d..076aece 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/wchar_t/exceptions_null.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_other/wchar_t/exceptions_null.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2005, 2009 Free Software Foundation, Inc. +// Copyright (C) 2005, 2009, 2010 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 @@ -28,7 +28,7 @@ void test1() bool test __attribute__((unused)) = true; wostringstream stream; - stream << static_cast<wstreambuf*>(NULL); + stream << static_cast<wstreambuf*>(0); VERIFY( stream.rdstate() & ios_base::badbit ); } @@ -42,7 +42,7 @@ void test3() try { - stream << static_cast<wstreambuf*>(NULL); + stream << static_cast<wstreambuf*>(0); VERIFY( false ); } catch (ios_base::failure&) diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/sentry/pod/1.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/sentry/pod/1.cc index 8a4088c..00becef 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ostream/sentry/pod/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ostream/sentry/pod/1.cc @@ -1,6 +1,7 @@ // 1999-10-14 bkoz -// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009 +// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, +// 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -40,7 +41,7 @@ void test01() const string_type str01; - stringbuf_type* strbuf01 = NULL; + stringbuf_type* strbuf01 = 0; stringbuf_type strbuf02(str01); ostream_type ostr01(strbuf01); ostream_type ostr02(&strbuf02); diff --git a/libstdc++-v3/testsuite/27_io/basic_ostringstream/pthread3.cc b/libstdc++-v3/testsuite/27_io/basic_ostringstream/pthread3.cc index 81a8c96..5b87d84 100644 --- a/libstdc++-v3/testsuite/27_io/basic_ostringstream/pthread3.cc +++ b/libstdc++-v3/testsuite/27_io/basic_ostringstream/pthread3.cc @@ -1,7 +1,7 @@ // 2002-01-23 Loren J. Rittle <rittle@labs.mot.com> <ljrittle@acm.org> // Adpated from libstdc++/5347 submitted by markus.breuer@materna.de // -// Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2009 +// Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -48,10 +48,10 @@ main() #endif for (int i = 0; i < max_thread_count; i++) - pthread_create (&tid[i], NULL, thread_main, 0); + pthread_create (&tid[i], 0, thread_main, 0); for (int i = 0; i < max_thread_count; i++) - pthread_join (tid[i], NULL); + pthread_join (tid[i], 0); return 0; } diff --git a/libstdc++-v3/testsuite/27_io/basic_streambuf/overflow/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_streambuf/overflow/char/1.cc index 918726c..65aff09 100644 --- a/libstdc++-v3/testsuite/27_io/basic_streambuf/overflow/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_streambuf/overflow/char/1.cc @@ -1,6 +1,7 @@ // 1999-10-11 bkoz -// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009 +// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, +// 2007, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -40,12 +41,12 @@ public: check_pointers() { bool test __attribute__((unused)) = true; - VERIFY( this->eback() == NULL ); - VERIFY( this->gptr() == NULL ); - VERIFY( this->egptr() == NULL ); - VERIFY( this->pbase() == NULL ); - VERIFY( this->pptr() == NULL ); - VERIFY( this->epptr() == NULL ); + VERIFY( !this->eback() ); + VERIFY( !this->gptr() ); + VERIFY( !this->egptr() ); + VERIFY( !this->pbase() ); + VERIFY( !this->pptr() ); + VERIFY( !this->epptr() ); return test; } diff --git a/libstdc++-v3/testsuite/27_io/basic_streambuf/overflow/wchar_t/1.cc b/libstdc++-v3/testsuite/27_io/basic_streambuf/overflow/wchar_t/1.cc index 384ea29..30b67e4 100644 --- a/libstdc++-v3/testsuite/27_io/basic_streambuf/overflow/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_streambuf/overflow/wchar_t/1.cc @@ -1,6 +1,6 @@ // 1999-10-11 bkoz -// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2009 +// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -40,12 +40,12 @@ public: check_pointers() { bool test __attribute__((unused)) = true; - VERIFY( this->eback() == NULL ); - VERIFY( this->gptr() == NULL ); - VERIFY( this->egptr() == NULL ); - VERIFY( this->pbase() == NULL ); - VERIFY( this->pptr() == NULL ); - VERIFY( this->epptr() == NULL ); + VERIFY( !this->eback() ); + VERIFY( !this->gptr() ); + VERIFY( !this->egptr() ); + VERIFY( !this->pbase() ); + VERIFY( !this->pptr() ); + VERIFY( !this->epptr() ); return test; } diff --git a/libstdc++-v3/testsuite/27_io/basic_streambuf/sgetc/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_streambuf/sgetc/char/1.cc index 37d729c..cbf1782 100644 --- a/libstdc++-v3/testsuite/27_io/basic_streambuf/sgetc/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_streambuf/sgetc/char/1.cc @@ -1,6 +1,7 @@ // 1999-10-11 bkoz -// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009 +// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, +// 2007, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -40,12 +41,12 @@ public: check_pointers() { bool test __attribute__((unused)) = true; - VERIFY( this->eback() == NULL ); - VERIFY( this->gptr() == NULL ); - VERIFY( this->egptr() == NULL ); - VERIFY( this->pbase() == NULL ); - VERIFY( this->pptr() == NULL ); - VERIFY( this->epptr() == NULL ); + VERIFY( !this->eback() ); + VERIFY( !this->gptr() ); + VERIFY( !this->egptr() ); + VERIFY( !this->pbase() ); + VERIFY( !this->pptr() ); + VERIFY( !this->epptr() ); return test; } diff --git a/libstdc++-v3/testsuite/27_io/basic_streambuf/sgetc/wchar_t/1.cc b/libstdc++-v3/testsuite/27_io/basic_streambuf/sgetc/wchar_t/1.cc index 16df099..0c5c63f 100644 --- a/libstdc++-v3/testsuite/27_io/basic_streambuf/sgetc/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_streambuf/sgetc/wchar_t/1.cc @@ -1,6 +1,6 @@ // 1999-10-11 bkoz -// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2009 +// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -40,12 +40,12 @@ public: check_pointers() { bool test __attribute__((unused)) = true; - VERIFY( this->eback() == NULL ); - VERIFY( this->gptr() == NULL ); - VERIFY( this->egptr() == NULL ); - VERIFY( this->pbase() == NULL ); - VERIFY( this->pptr() == NULL ); - VERIFY( this->epptr() == NULL ); + VERIFY( !this->eback() ); + VERIFY( !this->gptr() ); + VERIFY( !this->egptr() ); + VERIFY( !this->pbase() ); + VERIFY( !this->pptr() ); + VERIFY( !this->epptr() ); return test; } diff --git a/libstdc++-v3/testsuite/27_io/basic_streambuf/sgetn/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_streambuf/sgetn/char/1.cc index be6145c..d1530b1 100644 --- a/libstdc++-v3/testsuite/27_io/basic_streambuf/sgetn/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_streambuf/sgetn/char/1.cc @@ -1,6 +1,7 @@ // 1999-10-11 bkoz -// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009 +// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, +// 2007, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -40,12 +41,12 @@ public: check_pointers() { bool test __attribute__((unused)) = true; - VERIFY( this->eback() == NULL ); - VERIFY( this->gptr() == NULL ); - VERIFY( this->egptr() == NULL ); - VERIFY( this->pbase() == NULL ); - VERIFY( this->pptr() == NULL ); - VERIFY( this->epptr() == NULL ); + VERIFY( !this->eback() ); + VERIFY( !this->gptr() ); + VERIFY( !this->egptr() ); + VERIFY( !this->pbase() ); + VERIFY( !this->pptr() ); + VERIFY( !this->epptr() ); return test; } diff --git a/libstdc++-v3/testsuite/27_io/basic_streambuf/sgetn/wchar_t/1.cc b/libstdc++-v3/testsuite/27_io/basic_streambuf/sgetn/wchar_t/1.cc index 948865c..66b4af5 100644 --- a/libstdc++-v3/testsuite/27_io/basic_streambuf/sgetn/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_streambuf/sgetn/wchar_t/1.cc @@ -1,6 +1,6 @@ // 1999-10-11 bkoz -// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2009 +// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -40,12 +40,12 @@ public: check_pointers() { bool test __attribute__((unused)) = true; - VERIFY( this->eback() == NULL ); - VERIFY( this->gptr() == NULL ); - VERIFY( this->egptr() == NULL ); - VERIFY( this->pbase() == NULL ); - VERIFY( this->pptr() == NULL ); - VERIFY( this->epptr() == NULL ); + VERIFY( !this->eback() ); + VERIFY( !this->gptr() ); + VERIFY( !this->egptr() ); + VERIFY( !this->pbase() ); + VERIFY( !this->pptr() ); + VERIFY( !this->epptr() ); return test; } diff --git a/libstdc++-v3/testsuite/27_io/basic_streambuf/sputc/char/1057.cc b/libstdc++-v3/testsuite/27_io/basic_streambuf/sputc/char/1057.cc index 11cda23..440d82b 100644 --- a/libstdc++-v3/testsuite/27_io/basic_streambuf/sputc/char/1057.cc +++ b/libstdc++-v3/testsuite/27_io/basic_streambuf/sputc/char/1057.cc @@ -1,6 +1,6 @@ // 1999-10-11 bkoz -// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2009 +// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -32,7 +32,7 @@ public: nullsetpbuf() { setp(foo, foo + 64); - setp(NULL, NULL); + setp(0, 0); } }; diff --git a/libstdc++-v3/testsuite/27_io/basic_streambuf/sputc/wchar_t/1057.cc b/libstdc++-v3/testsuite/27_io/basic_streambuf/sputc/wchar_t/1057.cc index d04be24..5e7166f 100644 --- a/libstdc++-v3/testsuite/27_io/basic_streambuf/sputc/wchar_t/1057.cc +++ b/libstdc++-v3/testsuite/27_io/basic_streambuf/sputc/wchar_t/1057.cc @@ -1,6 +1,6 @@ // 1999-10-11 bkoz -// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2009 +// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -32,7 +32,7 @@ public: nullsetpbuf() { setp(foo, foo + 64); - setp(NULL, NULL); + setp(0, 0); } }; diff --git a/libstdc++-v3/testsuite/27_io/basic_streambuf/sputn/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_streambuf/sputn/char/1.cc index 0fe945e..2874b0e 100644 --- a/libstdc++-v3/testsuite/27_io/basic_streambuf/sputn/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_streambuf/sputn/char/1.cc @@ -1,6 +1,7 @@ // 1999-10-11 bkoz -// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009 +// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, +// 2007, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -40,12 +41,12 @@ public: check_pointers() { bool test __attribute__((unused)) = true; - VERIFY( this->eback() == NULL ); - VERIFY( this->gptr() == NULL ); - VERIFY( this->egptr() == NULL ); - VERIFY( this->pbase() == NULL ); - VERIFY( this->pptr() == NULL ); - VERIFY( this->epptr() == NULL ); + VERIFY( !this->eback() ); + VERIFY( !this->gptr() ); + VERIFY( !this->egptr() ); + VERIFY( !this->pbase() ); + VERIFY( !this->pptr() ); + VERIFY( !this->epptr() ); return test; } diff --git a/libstdc++-v3/testsuite/27_io/basic_streambuf/sputn/char/1057.cc b/libstdc++-v3/testsuite/27_io/basic_streambuf/sputn/char/1057.cc index 227a1c7..dda78bd 100644 --- a/libstdc++-v3/testsuite/27_io/basic_streambuf/sputn/char/1057.cc +++ b/libstdc++-v3/testsuite/27_io/basic_streambuf/sputn/char/1057.cc @@ -1,6 +1,6 @@ // 1999-10-11 bkoz -// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2009 +// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -32,7 +32,7 @@ public: nullsetpbuf() { setp(foo, foo + 64); - setp(NULL, NULL); + setp(0, 0); } }; diff --git a/libstdc++-v3/testsuite/27_io/basic_streambuf/sputn/wchar_t/1.cc b/libstdc++-v3/testsuite/27_io/basic_streambuf/sputn/wchar_t/1.cc index b03ab17..09b263b 100644 --- a/libstdc++-v3/testsuite/27_io/basic_streambuf/sputn/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_streambuf/sputn/wchar_t/1.cc @@ -1,6 +1,7 @@ // 1999-10-11 bkoz -// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009 +// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, +// 2007, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -41,12 +42,12 @@ public: check_pointers() { bool test __attribute__((unused)) = true; - VERIFY( this->eback() == NULL ); - VERIFY( this->gptr() == NULL ); - VERIFY( this->egptr() == NULL ); - VERIFY( this->pbase() == NULL ); - VERIFY( this->pptr() == NULL ); - VERIFY( this->epptr() == NULL ); + VERIFY( !this->eback() ); + VERIFY( !this->gptr() ); + VERIFY( !this->egptr() ); + VERIFY( !this->pbase() ); + VERIFY( !this->pptr() ); + VERIFY( !this->epptr() ); return test; } diff --git a/libstdc++-v3/testsuite/27_io/basic_streambuf/sputn/wchar_t/1057.cc b/libstdc++-v3/testsuite/27_io/basic_streambuf/sputn/wchar_t/1057.cc index b40e24c..9b148ba 100644 --- a/libstdc++-v3/testsuite/27_io/basic_streambuf/sputn/wchar_t/1057.cc +++ b/libstdc++-v3/testsuite/27_io/basic_streambuf/sputn/wchar_t/1057.cc @@ -1,6 +1,6 @@ // 1999-10-11 bkoz -// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2009 +// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -32,7 +32,7 @@ public: nullsetpbuf() { setp(foo, foo + 64); - setp(NULL, NULL); + setp(0, 0); } }; diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputc/char/1057.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputc/char/1057.cc index 06957dd..f88f28e 100644 --- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputc/char/1057.cc +++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputc/char/1057.cc @@ -1,6 +1,6 @@ // 1999-10-11 bkoz -// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2009 +// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -32,7 +32,7 @@ public: nullsetpbuf() { setp(foo, foo + 64); - setp(NULL, NULL); + setp(0, 0); } }; diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputc/wchar_t/1057.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputc/wchar_t/1057.cc index 4b4216b..ae07ebf 100644 --- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputc/wchar_t/1057.cc +++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputc/wchar_t/1057.cc @@ -1,6 +1,6 @@ // 1999-10-11 bkoz -// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2009 +// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -32,7 +32,7 @@ public: nullsetpbuf() { setp(foo, foo + 64); - setp(NULL, NULL); + setp(0, 0); } }; diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputn/char/1057.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputn/char/1057.cc index c05d289..c51f47a 100644 --- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputn/char/1057.cc +++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputn/char/1057.cc @@ -1,6 +1,6 @@ // 1999-10-11 bkoz -// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2009 +// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -32,7 +32,7 @@ public: nullsetpbuf() { setp(foo, foo + 64); - setp(NULL, NULL); + setp(0, 0); } }; diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputn/wchar_t/1057.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputn/wchar_t/1057.cc index 33d1ad7..99f7a55 100644 --- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputn/wchar_t/1057.cc +++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/sputn/wchar_t/1057.cc @@ -1,6 +1,6 @@ // 1999-10-11 bkoz -// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2009 +// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -32,7 +32,7 @@ public: nullsetpbuf() { setp(foo, foo + 64); - setp(NULL, NULL); + setp(0, 0); } }; diff --git a/libstdc++-v3/testsuite/27_io/objects/char/10.cc b/libstdc++-v3/testsuite/27_io/objects/char/10.cc index a744e78..eebebc2 100644 --- a/libstdc++-v3/testsuite/27_io/objects/char/10.cc +++ b/libstdc++-v3/testsuite/27_io/objects/char/10.cc @@ -1,6 +1,6 @@ // 2003-05-01 Petur Runolfsson <peturr02@ru.is> -// Copyright (C) 2003, 2009 Free Software Foundation, Inc. +// Copyright (C) 2003, 2009, 2010 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 @@ -32,7 +32,7 @@ void test10() const char* name = "filebuf_virtuals-1.txt"; FILE* ret = freopen(name, "r", stdin); - VERIFY( ret != NULL ); + VERIFY( ret ); streampos p1 = cin.tellg(); VERIFY( p1 != streampos(-1) ); diff --git a/libstdc++-v3/testsuite/27_io/objects/char/5268.cc b/libstdc++-v3/testsuite/27_io/objects/char/5268.cc index 44f569c..b7c0ac1 100644 --- a/libstdc++-v3/testsuite/27_io/objects/char/5268.cc +++ b/libstdc++-v3/testsuite/27_io/objects/char/5268.cc @@ -1,6 +1,6 @@ // 2001-06-05 Benjamin Kosnik <bkoz@redhat.com> -// Copyright (C) 2001, 2002, 2003, 2009 Free Software Foundation, Inc. +// Copyright (C) 2001, 2002, 2003, 2009, 2010 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 @@ -27,7 +27,7 @@ void test04() std::stringbuf b1; std::cout.rdbuf( &b1 ); std::cout << "hello\n"; - std::cout.rdbuf(NULL); + std::cout.rdbuf(0); } int main() diff --git a/libstdc++-v3/testsuite/27_io/objects/char/9661-1.cc b/libstdc++-v3/testsuite/27_io/objects/char/9661-1.cc index 59b8f4d..1ad194c 100644 --- a/libstdc++-v3/testsuite/27_io/objects/char/9661-1.cc +++ b/libstdc++-v3/testsuite/27_io/objects/char/9661-1.cc @@ -3,7 +3,7 @@ // 2003-04-30 Petur Runolfsson <peturr02@ru.is> -// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2009 +// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -58,7 +58,7 @@ bool test01() if (child == 0) { FILE* file = fopen(name, "r+"); - VERIFY( file != NULL ); + VERIFY( file != 0 ); fputs("Whatever\n", file); fflush(file); s1.signal(); diff --git a/libstdc++-v3/testsuite/27_io/objects/wchar_t/5268.cc b/libstdc++-v3/testsuite/27_io/objects/wchar_t/5268.cc index 918d4c5..04571cc 100644 --- a/libstdc++-v3/testsuite/27_io/objects/wchar_t/5268.cc +++ b/libstdc++-v3/testsuite/27_io/objects/wchar_t/5268.cc @@ -1,6 +1,6 @@ // 2003-05-01 Petur Runolfsson <peturr02@ru.is> -// Copyright (C) 2001, 2002, 2003, 2009 Free Software Foundation, Inc. +// Copyright (C) 2001, 2002, 2003, 2009, 2010 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 @@ -27,7 +27,7 @@ void test04() std::wstringbuf b1; std::wcout.rdbuf( &b1 ); std::wcout << L"hello\n"; - std::wcout.rdbuf(NULL); + std::wcout.rdbuf(0); } int main() diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_address/cons/aggregate.cc b/libstdc++-v3/testsuite/29_atomics/atomic_address/cons/aggregate.cc index fa35b9c..ae2b76f 100644 --- a/libstdc++-v3/testsuite/29_atomics/atomic_address/cons/aggregate.cc +++ b/libstdc++-v3/testsuite/29_atomics/atomic_address/cons/aggregate.cc @@ -1,7 +1,7 @@ // { dg-options "-std=gnu++0x" } // { dg-do compile } -// Copyright (C) 2008, 2009 Free Software Foundation, Inc. +// Copyright (C) 2008, 2009, 2010 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,6 +19,7 @@ // <http://www.gnu.org/licenses/>. #include <atomic> +#include <cstddef> int main() { diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_address/cons/single_value.cc b/libstdc++-v3/testsuite/29_atomics/atomic_address/cons/single_value.cc index 7a2e949..b7e524a 100644 --- a/libstdc++-v3/testsuite/29_atomics/atomic_address/cons/single_value.cc +++ b/libstdc++-v3/testsuite/29_atomics/atomic_address/cons/single_value.cc @@ -1,6 +1,6 @@ // { dg-options "-std=gnu++0x" } -// Copyright (C) 2008, 2009 Free Software Foundation, Inc. +// Copyright (C) 2008, 2009, 2010 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 @@ -22,7 +22,7 @@ int main() { // Single value constructor. - void* v = NULL; + void* v = 0; std::atomic_address a(v); return 0; } diff --git a/libstdc++-v3/testsuite/30_threads/mutex/cons/assign_neg.cc b/libstdc++-v3/testsuite/30_threads/mutex/cons/assign_neg.cc index 078cffc..7e9d30b 100644 --- a/libstdc++-v3/testsuite/30_threads/mutex/cons/assign_neg.cc +++ b/libstdc++-v3/testsuite/30_threads/mutex/cons/assign_neg.cc @@ -3,7 +3,7 @@ // { dg-require-cstdint "" } // { dg-require-gthreads "" } -// Copyright (C) 2008, 2009 Free Software Foundation, Inc. +// Copyright (C) 2008, 2009, 2010 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 @@ -33,4 +33,4 @@ void test01() } // { dg-error "used here" "" { target *-*-* } 32 } -// { dg-error "deleted function" "" { target *-*-* } 83 } +// { dg-error "deleted function" "" { target *-*-* } 82 } diff --git a/libstdc++-v3/testsuite/30_threads/mutex/cons/copy_neg.cc b/libstdc++-v3/testsuite/30_threads/mutex/cons/copy_neg.cc index e13a0f6c..c1ef051 100644 --- a/libstdc++-v3/testsuite/30_threads/mutex/cons/copy_neg.cc +++ b/libstdc++-v3/testsuite/30_threads/mutex/cons/copy_neg.cc @@ -3,7 +3,7 @@ // { dg-require-cstdint "" } // { dg-require-gthreads "" } -// Copyright (C) 2008, 2009 Free Software Foundation, Inc. +// Copyright (C) 2008, 2009, 2010 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 @@ -32,4 +32,4 @@ void test01() } // { dg-error "used here" "" { target *-*-* } 31 } -// { dg-error "deleted function" "" { target *-*-* } 82 } +// { dg-error "deleted function" "" { target *-*-* } 81 } diff --git a/libstdc++-v3/testsuite/30_threads/recursive_mutex/cons/assign_neg.cc b/libstdc++-v3/testsuite/30_threads/recursive_mutex/cons/assign_neg.cc index 6c6cefa..42af439 100644 --- a/libstdc++-v3/testsuite/30_threads/recursive_mutex/cons/assign_neg.cc +++ b/libstdc++-v3/testsuite/30_threads/recursive_mutex/cons/assign_neg.cc @@ -3,7 +3,7 @@ // { dg-require-cstdint "" } // { dg-require-gthreads "" } -// Copyright (C) 2008, 2009 Free Software Foundation, Inc. +// Copyright (C) 2008, 2009, 2010 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 @@ -33,4 +33,4 @@ void test01() } // { dg-error "used here" "" { target *-*-* } 32 } -// { dg-error "deleted function" "" { target *-*-* } 135 } +// { dg-error "deleted function" "" { target *-*-* } 134 } diff --git a/libstdc++-v3/testsuite/30_threads/recursive_mutex/cons/copy_neg.cc b/libstdc++-v3/testsuite/30_threads/recursive_mutex/cons/copy_neg.cc index b62011b..53ff57d 100644 --- a/libstdc++-v3/testsuite/30_threads/recursive_mutex/cons/copy_neg.cc +++ b/libstdc++-v3/testsuite/30_threads/recursive_mutex/cons/copy_neg.cc @@ -3,7 +3,7 @@ // { dg-require-cstdint "" } // { dg-require-gthreads "" } -// Copyright (C) 2008, 2009 Free Software Foundation, Inc. +// Copyright (C) 2008, 2009, 2010 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 @@ -32,4 +32,4 @@ void test01() } // { dg-error "used here" "" { target *-*-* } 31 } -// { dg-error "deleted function" "" { target *-*-* } 134 } +// { dg-error "deleted function" "" { target *-*-* } 133 } diff --git a/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/cons/assign_neg.cc b/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/cons/assign_neg.cc index 2e092be..7fa6428 100644 --- a/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/cons/assign_neg.cc +++ b/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/cons/assign_neg.cc @@ -3,7 +3,7 @@ // { dg-require-cstdint "" } // { dg-require-gthreads "" } -// Copyright (C) 2008, 2009 Free Software Foundation, Inc. +// Copyright (C) 2008, 2009, 2010 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 @@ -33,4 +33,4 @@ void test01() } // { dg-error "used here" "" { target *-*-* } 32 } -// { dg-error "deleted function" "" { target *-*-* } 298 } +// { dg-error "deleted function" "" { target *-*-* } 297 } diff --git a/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/cons/copy_neg.cc b/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/cons/copy_neg.cc index 9d10a7d..df1ca0b 100644 --- a/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/cons/copy_neg.cc +++ b/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/cons/copy_neg.cc @@ -3,7 +3,7 @@ // { dg-require-cstdint "" } // { dg-require-gthreads "" } -// Copyright (C) 2008, 2009 Free Software Foundation, Inc. +// Copyright (C) 2008, 2009, 2010 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 @@ -32,4 +32,4 @@ void test01() } // { dg-error "used here" "" { target *-*-* } 31 } -// { dg-error "deleted function" "" { target *-*-* } 297 } +// { dg-error "deleted function" "" { target *-*-* } 296 } diff --git a/libstdc++-v3/testsuite/30_threads/thread/cons/assign_neg.cc b/libstdc++-v3/testsuite/30_threads/thread/cons/assign_neg.cc index f45b9f2..1170579 100644 --- a/libstdc++-v3/testsuite/30_threads/thread/cons/assign_neg.cc +++ b/libstdc++-v3/testsuite/30_threads/thread/cons/assign_neg.cc @@ -32,4 +32,4 @@ void test01() } // { dg-error "used here" "" { target *-*-* } 31 } -// { dg-error "deleted function" "" { target *-*-* } 149 } +// { dg-error "deleted function" "" { target *-*-* } 148 } diff --git a/libstdc++-v3/testsuite/30_threads/thread/cons/copy_neg.cc b/libstdc++-v3/testsuite/30_threads/thread/cons/copy_neg.cc index ce5034b..898ad16 100644 --- a/libstdc++-v3/testsuite/30_threads/thread/cons/copy_neg.cc +++ b/libstdc++-v3/testsuite/30_threads/thread/cons/copy_neg.cc @@ -31,5 +31,5 @@ void test01() } // { dg-error "here" "" { target *-*-* } 30 } -// { dg-error "deleted function" "" { target *-*-* } 127 } +// { dg-error "deleted function" "" { target *-*-* } 126 } // { dg-excess-errors "In file included from" } diff --git a/libstdc++-v3/testsuite/30_threads/timed_mutex/cons/assign_neg.cc b/libstdc++-v3/testsuite/30_threads/timed_mutex/cons/assign_neg.cc index 4648196..45b2385 100644 --- a/libstdc++-v3/testsuite/30_threads/timed_mutex/cons/assign_neg.cc +++ b/libstdc++-v3/testsuite/30_threads/timed_mutex/cons/assign_neg.cc @@ -3,7 +3,7 @@ // { dg-require-cstdint "" } // { dg-require-gthreads "" } -// Copyright (C) 2008, 2009 Free Software Foundation, Inc. +// Copyright (C) 2008, 2009, 2010 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 @@ -33,4 +33,4 @@ void test01() } // { dg-error "used here" "" { target *-*-* } 32 } -// { dg-error "deleted function" "" { target *-*-* } 193 } +// { dg-error "deleted function" "" { target *-*-* } 192 } diff --git a/libstdc++-v3/testsuite/30_threads/timed_mutex/cons/copy_neg.cc b/libstdc++-v3/testsuite/30_threads/timed_mutex/cons/copy_neg.cc index 716b056..04dea64 100644 --- a/libstdc++-v3/testsuite/30_threads/timed_mutex/cons/copy_neg.cc +++ b/libstdc++-v3/testsuite/30_threads/timed_mutex/cons/copy_neg.cc @@ -3,7 +3,7 @@ // { dg-require-cstdint "" } // { dg-require-gthreads "" } -// Copyright (C) 2008, 2009 Free Software Foundation, Inc. +// Copyright (C) 2008, 2009, 2010 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 @@ -32,4 +32,4 @@ void test01() } // { dg-error "used here" "" { target *-*-* } 31 } -// { dg-error "deleted function" "" { target *-*-* } 192 } +// { dg-error "deleted function" "" { target *-*-* } 191 } diff --git a/libstdc++-v3/testsuite/ext/mt_allocator/22309_thread.cc b/libstdc++-v3/testsuite/ext/mt_allocator/22309_thread.cc index bd52fd3..609f188 100644 --- a/libstdc++-v3/testsuite/ext/mt_allocator/22309_thread.cc +++ b/libstdc++-v3/testsuite/ext/mt_allocator/22309_thread.cc @@ -1,7 +1,7 @@ // { dg-require-sharedlib "" } // { dg-options "-g -O2 -pthread -ldl" { target *-*-linux* } } -// Copyright (C) 2004, 2005, 2009 Free Software Foundation, Inc. +// Copyright (C) 2004, 2005, 2009, 2010 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 @@ -93,7 +93,7 @@ int main (void) { pthread_t th; - pthread_create(&th, NULL, tf, NULL); - pthread_join(th, NULL); + pthread_create(&th, 0, tf, 0); + pthread_join(th, 0); return 0; } diff --git a/libstdc++-v3/testsuite/ext/rope/pthread7-rope.cc b/libstdc++-v3/testsuite/ext/rope/pthread7-rope.cc index b1520be..fd1ed09 100644 --- a/libstdc++-v3/testsuite/ext/rope/pthread7-rope.cc +++ b/libstdc++-v3/testsuite/ext/rope/pthread7-rope.cc @@ -1,6 +1,6 @@ // 2003-05-03 Loren J. Rittle <rittle@labs.mot.com> <ljrittle@acm.org> // -// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2009 +// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -90,10 +90,10 @@ main() foo4 += foo3; for (int i = 0; i < max_thread_count; i++) - pthread_create (&tid[i], NULL, thread_main, 0); + pthread_create (&tid[i], 0, thread_main, 0); for (int i = 0; i < max_thread_count; i++) - pthread_join (tid[i], NULL); + pthread_join (tid[i], 0); } VERIFY( !std::strcmp (data, "barbazbongle") ); diff --git a/libstdc++-v3/testsuite/ext/slist/23781.cc b/libstdc++-v3/testsuite/ext/slist/23781.cc index 9b0e0a5..e1493c6 100644 --- a/libstdc++-v3/testsuite/ext/slist/23781.cc +++ b/libstdc++-v3/testsuite/ext/slist/23781.cc @@ -1,6 +1,6 @@ // 2005-09-10 Paolo Carlini <pcarlini@suse.de> // -// Copyright (C) 2005, 2009 Free Software Foundation, Inc. +// Copyright (C) 2005, 2009, 2010 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 @@ -22,6 +22,7 @@ // libstdc++/23781 #include <ext/slist> +#include <cstddef> __gnu_cxx::slist<int>::iterator it = NULL; // { dg-error "conversion" } __gnu_cxx::slist<int>::const_iterator cit = NULL; // { dg-error "conversion" } diff --git a/libstdc++-v3/testsuite/ext/stdio_filebuf/char/10063-2.cc b/libstdc++-v3/testsuite/ext/stdio_filebuf/char/10063-2.cc index ce719e5..d0a1fcf 100644 --- a/libstdc++-v3/testsuite/ext/stdio_filebuf/char/10063-2.cc +++ b/libstdc++-v3/testsuite/ext/stdio_filebuf/char/10063-2.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2000, 2001, 2002, 2003, 2009 Free Software Foundation +// Copyright (C) 2000, 2001, 2002, 2003, 2009, 2010 Free Software Foundation // // 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 @@ -37,7 +37,7 @@ void test2() fbuf.close(); FILE* file = fopen("tmp_10063-2", "r"); - setbuf(file, NULL); + setbuf(file, 0); int c = getc(file); VERIFY(c == '0'); c = getc(file); diff --git a/libstdc++-v3/testsuite/tr1/6_containers/unordered_multimap/requirements/iterator_null_neg.cc b/libstdc++-v3/testsuite/tr1/6_containers/unordered_multimap/requirements/iterator_null_neg.cc index a8a06fd..1709816 100644 --- a/libstdc++-v3/testsuite/tr1/6_containers/unordered_multimap/requirements/iterator_null_neg.cc +++ b/libstdc++-v3/testsuite/tr1/6_containers/unordered_multimap/requirements/iterator_null_neg.cc @@ -1,6 +1,6 @@ // 2005-09-10 Paolo Carlini <pcarlini@suse.de> // -// Copyright (C) 2005, 2009 Free Software Foundation, Inc. +// Copyright (C) 2005, 2009, 2010 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 @@ -22,6 +22,7 @@ // libstdc++/23781 #include <tr1/unordered_map> +#include <cstddef> std::tr1::unordered_multimap<int, int>::iterator it2 = NULL; // { dg-error "conversion" } std::tr1::unordered_multimap<int, int>::const_iterator cit2 = NULL; // { dg-error "conversion" } diff --git a/libstdc++-v3/testsuite/tr1/6_containers/unordered_multiset/requirements/iterator_null_neg.cc b/libstdc++-v3/testsuite/tr1/6_containers/unordered_multiset/requirements/iterator_null_neg.cc index d77676e..2201b2d 100644 --- a/libstdc++-v3/testsuite/tr1/6_containers/unordered_multiset/requirements/iterator_null_neg.cc +++ b/libstdc++-v3/testsuite/tr1/6_containers/unordered_multiset/requirements/iterator_null_neg.cc @@ -1,6 +1,6 @@ // 2005-09-10 Paolo Carlini <pcarlini@suse.de> // -// Copyright (C) 2005, 2009 Free Software Foundation, Inc. +// Copyright (C) 2005, 2009, 2010 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 @@ -22,6 +22,7 @@ // libstdc++/23781 #include <tr1/unordered_set> +#include <cstddef> std::tr1::unordered_multiset<int>::iterator it3 = NULL; // { dg-error "conversion" } std::tr1::unordered_multiset<int>::const_iterator cit3 = NULL; // { dg-error "conversion" } diff --git a/libstdc++-v3/testsuite/util/regression/rand/assoc/container_rand_regression_test.tcc b/libstdc++-v3/testsuite/util/regression/rand/assoc/container_rand_regression_test.tcc index 43cdb9f..0f15866 100644 --- a/libstdc++-v3/testsuite/util/regression/rand/assoc/container_rand_regression_test.tcc +++ b/libstdc++-v3/testsuite/util/regression/rand/assoc/container_rand_regression_test.tcc @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005, 2006, 2008, 2009 Free Software Foundation, Inc. +// Copyright (C) 2005, 2006, 2008, 2009, 2010 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 terms @@ -45,7 +45,7 @@ container_rand_regression_test(unsigned long seed, size_t n, size_t m, double mp, bool disp) : m_seed((seed == 0) ? twister_rand_gen::get_time_determined_seed() : seed), m_n(n), m_m(m), m_tp(tp), m_ip(ip), m_ep(ep), m_cp(cp), m_mp(mp), - m_disp(disp), m_p_c(NULL) + m_disp(disp), m_p_c(0) { } PB_DS_CLASS_T_DEC @@ -71,7 +71,7 @@ default_constructor() done = false; } - if (m_p_c != NULL) + if (m_p_c) PB_DS_COND_COMPARE(*m_p_c, m_native_c); return done; } @@ -98,7 +98,7 @@ copy_constructor() { PB_DS_TRACE("copy_constructor"); bool done = true; - Cntnr* p_c = NULL; + Cntnr* p_c = 0; m_alloc.set_probability(m_tp); typename alloc_t::group_adjustor adjust(m_p_c->size()); @@ -124,7 +124,7 @@ assignment_operator() { PB_DS_TRACE("assignment operator"); bool done = true; - Cntnr* p_c = NULL; + Cntnr* p_c = 0; m_alloc.set_probability(m_tp); typename alloc_t::group_adjustor adjust(m_p_c->size()); @@ -159,7 +159,7 @@ PB_DS_CLASS_C_DEC:: it_constructor_imp(__gnu_pbds::cc_hash_tag) { bool done = true; - Cntnr* p_c = NULL; + Cntnr* p_c = 0; m_alloc.set_probability(m_tp); typename alloc_t::group_adjustor adjust(m_p_c->size()); @@ -226,7 +226,7 @@ PB_DS_CLASS_C_DEC:: it_constructor_imp(__gnu_pbds::gp_hash_tag) { bool done = true; - Cntnr* p_c = NULL; + Cntnr* p_c = 0; m_alloc.set_probability(m_tp); typename alloc_t::group_adjustor adjust(m_p_c->size()); @@ -309,7 +309,7 @@ PB_DS_CLASS_C_DEC:: it_constructor_imp(__gnu_pbds::tree_tag) { bool done = true; - Cntnr* p_c = NULL; + Cntnr* p_c = 0; m_alloc.set_probability(m_tp); typename alloc_t::group_adjustor adjust(m_p_c->size()); @@ -345,7 +345,7 @@ PB_DS_CLASS_C_DEC:: it_constructor_imp(__gnu_pbds::list_update_tag) { bool done = true; - Cntnr* p_c = NULL; + Cntnr* p_c = 0; m_alloc.set_probability(m_tp); typename alloc_t::group_adjustor adjust(m_p_c->size()); @@ -370,7 +370,7 @@ PB_DS_CLASS_C_DEC:: it_constructor_imp(__gnu_pbds::pat_trie_tag) { bool done = true; - Cntnr* p_c = NULL; + Cntnr* p_c = 0; m_alloc.set_probability(m_tp); typename alloc_t::group_adjustor adjust(m_p_c->size()); @@ -869,7 +869,7 @@ PB_DS_CLASS_C_DEC:: operator()() { typedef xml_result_set_regression_formatter formatter_type; - formatter_type* p_fmt = NULL; + formatter_type* p_fmt = 0; if (m_disp) p_fmt = new formatter_type(string_form<Cntnr>::name(), @@ -1591,30 +1591,30 @@ policy_access(__gnu_pbds::basic_hash_tag) { { typename Cntnr::hash_fn& r_t = m_p_c->get_hash_fn(); - assert(&r_t != NULL); + assert(&r_t); } { const typename Cntnr::hash_fn& r_t =((const Cntnr& )*m_p_c).get_hash_fn(); - assert(&r_t != NULL); + assert(&r_t); } { typename Cntnr::eq_fn& r_t = m_p_c->get_eq_fn(); - assert(&r_t != NULL); + assert(&r_t); } { const typename Cntnr::eq_fn& r_t =((const Cntnr& )*m_p_c).get_eq_fn(); - assert(&r_t != NULL); + assert(&r_t); } { typename Cntnr::resize_policy& r_t = m_p_c->get_resize_policy(); - assert(&r_t != NULL); + assert(&r_t); } { const typename Cntnr::resize_policy& r_t =((const Cntnr& )*m_p_c).get_resize_policy(); - assert(&r_t != NULL); + assert(&r_t); } } @@ -1627,12 +1627,12 @@ policy_access(__gnu_pbds::cc_hash_tag) { typename Cntnr::comb_hash_fn& r_t = m_p_c->get_comb_hash_fn(); - assert(&r_t != NULL); + assert(&r_t); } { const typename Cntnr::comb_hash_fn& r_t =((const Cntnr& )*m_p_c).get_comb_hash_fn(); - assert(&r_t != NULL); + assert(&r_t); } } @@ -1645,21 +1645,21 @@ policy_access(__gnu_pbds::gp_hash_tag) { typename Cntnr::comb_probe_fn& r_t = m_p_c->get_comb_probe_fn(); - assert(&r_t != NULL); + assert(&r_t); } { const typename Cntnr::comb_probe_fn& r_t =((const Cntnr& )*m_p_c).get_comb_probe_fn(); - assert(&r_t != NULL); + assert(&r_t); } { typename Cntnr::probe_fn& r_t = m_p_c->get_probe_fn(); - assert(&r_t != NULL); + assert(&r_t); } { const typename Cntnr::probe_fn& r_t =((const Cntnr& )*m_p_c).get_probe_fn(); - assert(&r_t != NULL); + assert(&r_t); } } @@ -1670,12 +1670,12 @@ policy_access(__gnu_pbds::tree_tag) { { typename Cntnr::cmp_fn& r_t = m_p_c->get_cmp_fn(); - assert(&r_t != NULL); + assert(&r_t); } { const typename Cntnr::cmp_fn& r_t =((const Cntnr& )*m_p_c).get_cmp_fn(); - assert(&r_t != NULL); + assert(&r_t); } } @@ -1691,7 +1691,7 @@ PB_DS_CLASS_C_DEC:: policy_access(__gnu_pbds::pat_trie_tag) { typename Cntnr::e_access_traits& r_t = m_p_c->get_e_access_traits(); - assert(&r_t != NULL); + assert(&r_t); } diff --git a/libstdc++-v3/testsuite/util/regression/rand/assoc/rand_regression_test.hpp b/libstdc++-v3/testsuite/util/regression/rand/assoc/rand_regression_test.hpp index d4b395b..5f23049 100644 --- a/libstdc++-v3/testsuite/util/regression/rand/assoc/rand_regression_test.hpp +++ b/libstdc++-v3/testsuite/util/regression/rand/assoc/rand_regression_test.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc. +// Copyright (C) 2005, 2006, 2009, 2010 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 terms @@ -124,7 +124,7 @@ namespace detail }; // XXX RAII, constructor takes bool for display - xml_test_rand_regression_formatter* p_fmt = NULL; + xml_test_rand_regression_formatter* p_fmt = 0; if (disp) p_fmt = new xml_test_rand_regression_formatter(sd, n, m, tp, ip, ep, cp, mp); diff --git a/libstdc++-v3/testsuite/util/regression/rand/priority_queue/container_rand_regression_test.tcc b/libstdc++-v3/testsuite/util/regression/rand/priority_queue/container_rand_regression_test.tcc index f964911..e929f35 100644 --- a/libstdc++-v3/testsuite/util/regression/rand/priority_queue/container_rand_regression_test.tcc +++ b/libstdc++-v3/testsuite/util/regression/rand/priority_queue/container_rand_regression_test.tcc @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005, 2006, 2008, 2009 Free Software Foundation, Inc. +// Copyright (C) 2005, 2006, 2008, 2009, 2010 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 terms @@ -45,7 +45,7 @@ container_rand_regression_test(unsigned long seed, size_t n, size_t m, double cp, double mp, bool disp) : m_seed(seed == 0 ? twister_rand_gen::get_time_determined_seed(): seed), m_n(n), m_m(m), m_tp(tp), m_ip(ip), m_dp(dp), m_ep(ep), m_cp(cp), - m_mp(mp), m_disp(disp), m_p_c(NULL) + m_mp(mp), m_disp(disp), m_p_c(0) { } PB_DS_CLASS_T_DEC @@ -71,7 +71,7 @@ default_constructor() done = false; } - if (m_p_c != NULL) + if (m_p_c) PB_DS_COND_COMPARE(*m_p_c, m_native_c); return done; @@ -99,7 +99,7 @@ copy_constructor() { PB_DS_TRACE("copy_constructor"); bool done = true; - Cntnr* p_c = NULL; + Cntnr* p_c = 0; m_alloc.set_probability(m_tp); typedef typename allocator_type::group_adjustor adjustor; @@ -127,7 +127,7 @@ assignment_operator() { PB_DS_TRACE("assignment operator"); bool done = true; - Cntnr* p_c = NULL; + Cntnr* p_c = 0; m_alloc.set_probability(m_tp); typedef typename allocator_type::group_adjustor adjustor; @@ -155,7 +155,7 @@ PB_DS_CLASS_C_DEC:: it_constructor() { bool done = true; - Cntnr* p_c = NULL; + Cntnr* p_c = 0; m_alloc.set_probability(m_tp); typedef typename allocator_type::group_adjustor adjustor; adjustor adjust(m_p_c->size()); @@ -242,7 +242,7 @@ PB_DS_CLASS_C_DEC:: operator()() { typedef xml_result_set_regression_formatter formatter_type; - formatter_type* p_fmt = NULL; + formatter_type* p_fmt = 0; if (m_disp) p_fmt = new formatter_type(string_form<Cntnr>::name(), string_form<Cntnr>::desc()); @@ -668,12 +668,12 @@ policy_access() { typename Cntnr::cmp_fn& r_t = m_p_c->get_cmp_fn(); - assert(&r_t != NULL); + assert(&r_t); } { const typename Cntnr::cmp_fn& r_t =((const Cntnr& )*m_p_c).get_cmp_fn(); - assert(&r_t != NULL); + assert(&r_t); } } diff --git a/libstdc++-v3/testsuite/util/regression/rand/priority_queue/rand_regression_test.hpp b/libstdc++-v3/testsuite/util/regression/rand/priority_queue/rand_regression_test.hpp index 1cf8602..37f8d51 100644 --- a/libstdc++-v3/testsuite/util/regression/rand/priority_queue/rand_regression_test.hpp +++ b/libstdc++-v3/testsuite/util/regression/rand/priority_queue/rand_regression_test.hpp @@ -1,6 +1,6 @@ // -*- C++ -*- -// Copyright (C) 2005, 2006, 2008, 2009 Free Software Foundation, Inc. +// Copyright (C) 2005, 2006, 2008, 2009, 2010 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 terms @@ -123,7 +123,7 @@ namespace detail return -2; }; - xml_test_rand_regression_formatter* p_fmt = NULL; + xml_test_rand_regression_formatter* p_fmt = 0; if (sd == 0) sd = twister_rand_gen::get_time_determined_seed(); if (disp) diff --git a/libstdc++-v3/testsuite/util/replacement_memory_operators.h b/libstdc++-v3/testsuite/util/replacement_memory_operators.h index c7b19ed..895ccfe 100644 --- a/libstdc++-v3/testsuite/util/replacement_memory_operators.h +++ b/libstdc++-v3/testsuite/util/replacement_memory_operators.h @@ -1,5 +1,5 @@ // -// Copyright (C) 2007, 2009 Free Software Foundation, Inc. +// Copyright (C) 2007, 2009, 2010 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 @@ -90,7 +90,7 @@ void* operator new(std::size_t size) throw(std::bad_alloc) { std::printf("operator new is called \n"); void* p = std::malloc(size); - if (p == NULL) + if (!p) throw std::bad_alloc(); __gnu_test::counter::increment(); return p; @@ -99,7 +99,7 @@ void* operator new(std::size_t size) throw(std::bad_alloc) void operator delete(void* p) throw() { std::printf("operator delete is called \n"); - if (p != NULL) + if (p) { std::free(p); __gnu_test::counter::decrement(); diff --git a/libstdc++-v3/testsuite/util/testsuite_allocator.h b/libstdc++-v3/testsuite/util/testsuite_allocator.h index 96fe546..b7fce48 100644 --- a/libstdc++-v3/testsuite/util/testsuite_allocator.h +++ b/libstdc++-v3/testsuite/util/testsuite_allocator.h @@ -1,7 +1,7 @@ // -*- C++ -*- // Testing allocator for the C++ library testsuite. // -// Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 +// Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -186,8 +186,8 @@ namespace __gnu_test { // Let's not core here... Alloc a; - a.deallocate(NULL, 1); - a.deallocate(NULL, 10); + a.deallocate(0, 1); + a.deallocate(0, 10); return true; } diff --git a/libstdc++-v3/testsuite/util/testsuite_hooks.cc b/libstdc++-v3/testsuite/util/testsuite_hooks.cc index 6d77d57..5b5b0d5 100644 --- a/libstdc++-v3/testsuite/util/testsuite_hooks.cc +++ b/libstdc++-v3/testsuite/util/testsuite_hooks.cc @@ -2,7 +2,7 @@ // Utility subroutines for the C++ library testsuite. // -// Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 +// Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -170,7 +170,7 @@ namespace __gnu_test locale orig = locale::global(loc_name); const char* res = setlocale(LC_ALL, name); - if (res != NULL) + if (res) { string preLC_ALL = res; const func_callback::test_type* tests = l.tests(); diff --git a/libstdc++-v3/testsuite/util/testsuite_io.h b/libstdc++-v3/testsuite/util/testsuite_io.h index 50b1955..681448a 100644 --- a/libstdc++-v3/testsuite/util/testsuite_io.h +++ b/libstdc++-v3/testsuite/util/testsuite_io.h @@ -1,7 +1,7 @@ // -*- C++ -*- // Testing streambuf/filebuf/stringbuf for the C++ library testsuite. // -// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2009 +// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -47,7 +47,7 @@ namespace __gnu_test bool write_position() { - bool one = this->pptr() != NULL; + bool one = this->pptr() != 0; bool two = this->pptr() < this->epptr(); return one && two; } @@ -55,7 +55,7 @@ namespace __gnu_test bool read_position() { - bool one = this->gptr() != NULL; + bool one = this->gptr() != 0; bool two = this->gptr() < this->egptr(); return one && two; } @@ -63,21 +63,21 @@ namespace __gnu_test bool unbuffered() { - bool one = this->pbase() == NULL; - bool two = this->pptr() == NULL; + bool one = this->pbase() == 0; + bool two = this->pptr() == 0; return one && two; } bool check_pointers() { - bool one = this->eback() == NULL; - bool two = this->gptr() == NULL; - bool three = this->egptr() == NULL; + bool one = this->eback() == 0; + bool two = this->gptr() == 0; + bool three = this->egptr() == 0; - bool four = this->pbase() == NULL; - bool five = this->pptr() == NULL; - bool six = this->epptr() == NULL; + bool four = this->pbase() == 0; + bool five = this->pptr() == 0; + bool six = this->epptr() == 0; return one && two && three && four && five && six; } }; @@ -276,37 +276,37 @@ namespace __gnu_test protected: iter_type do_put(iter_type, ios_base&, char_type, bool) const - { throw facet_error(); return iter_type(NULL); } + { throw facet_error(); return iter_type(0); } virtual iter_type do_put(iter_type, ios_base&, char_type, long) const - { throw facet_error(); return iter_type(NULL); } + { throw facet_error(); return iter_type(0); } virtual iter_type do_put(iter_type, ios_base&, char_type, unsigned long) const - { throw facet_error(); return iter_type(NULL); } + { throw facet_error(); return iter_type(0); } #ifdef _GLIBCXX_USE_LONG_LONG virtual iter_type do_put(iter_type, ios_base&, char_type, long long) const - { throw facet_error(); return iter_type(NULL); } + { throw facet_error(); return iter_type(0); } virtual iter_type do_put(iter_type, ios_base&, char_type, unsigned long long) const - { throw facet_error(); return iter_type(NULL); } + { throw facet_error(); return iter_type(0); } #endif virtual iter_type do_put(iter_type, ios_base&, char_type, double) const - { throw facet_error(); return iter_type(NULL); } + { throw facet_error(); return iter_type(0); } virtual iter_type do_put(iter_type, ios_base&, char_type, long double) const - { throw facet_error(); return iter_type(NULL); } + { throw facet_error(); return iter_type(0); } virtual iter_type do_put(iter_type, ios_base&, char_type, const void*) const - { throw facet_error(); return iter_type(NULL); } + { throw facet_error(); return iter_type(0); } }; typedef fail_num_put<char> fail_num_put_char; diff --git a/libstdc++-v3/testsuite/util/testsuite_iterators.h b/libstdc++-v3/testsuite/util/testsuite_iterators.h index 14a725f..ee0c8e6 100644 --- a/libstdc++-v3/testsuite/util/testsuite_iterators.h +++ b/libstdc++-v3/testsuite/util/testsuite_iterators.h @@ -1,7 +1,7 @@ // -*- C++ -*- // Iterator Wrappers for the C++ library testsuite. // -// Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 +// Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -201,7 +201,7 @@ namespace __gnu_test bool operator==(const input_iterator_wrapper& in) const { - ITERATOR_VERIFY(SharedInfo != NULL && SharedInfo == in.SharedInfo); + ITERATOR_VERIFY(SharedInfo && SharedInfo == in.SharedInfo); ITERATOR_VERIFY(ptr>=SharedInfo->first && in.ptr>=SharedInfo->first); return ptr == in.ptr; } @@ -274,8 +274,8 @@ namespace __gnu_test forward_iterator_wrapper() { - this->ptr = NULL; - this->SharedInfo = NULL; + this->ptr = 0; + this->SharedInfo = 0; } T& diff --git a/libstdc++-v3/testsuite/util/testsuite_performance.h b/libstdc++-v3/testsuite/util/testsuite_performance.h index 54cf885..61efd04 100644 --- a/libstdc++-v3/testsuite/util/testsuite_performance.h +++ b/libstdc++-v3/testsuite/util/testsuite_performance.h @@ -1,7 +1,7 @@ // -*- C++ -*- // Testing performance utilities for the C++ library testsuite. // -// Copyright (C) 2003, 2004, 2005, 2007, 2008, 2009 +// Copyright (C) 2003, 2004, 2005, 2007, 2008, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -50,7 +50,7 @@ extern "C" struct mallinfo mallinfo(void) { - struct mallinfo m = { (((size_t) sbrk (0) + 1023) / 1024), 0 }; + struct mallinfo m = { (((std::size_t) sbrk (0) + 1023) / 1024), 0 }; return m; } } @@ -114,15 +114,15 @@ namespace __gnu_test std::__throw_runtime_error("time_counter::stop"); } - size_t + std::size_t real_time() const { return elapsed_end - elapsed_begin; } - size_t + std::size_t user_time() const { return tms_end.tms_utime - tms_begin.tms_utime; } - size_t + std::size_t system_time() const { return tms_end.tms_stime - tms_begin.tms_stime; } }; @@ -383,7 +383,7 @@ template<typename Container, int Iter> template<typename Container, int Iter> void* - do_thread(void* p = NULL) + do_thread(void* p = 0) { do_loop<Container, Iter>(); return p; @@ -412,10 +412,10 @@ template<typename Container, int Iter, bool Thread> pthread_create(&t3, 0, &do_thread<Container, Iter>, 0); pthread_create(&t4, 0, &do_thread<Container, Iter>, 0); - pthread_join(t1, NULL); - pthread_join(t2, NULL); - pthread_join(t3, NULL); - pthread_join(t4, NULL); + pthread_join(t1, 0); + pthread_join(t2, 0); + pthread_join(t3, 0); + pthread_join(t4, 0); #endif } stop_counters(time, resource); |