diff options
author | Paolo Carlini <paolo@gcc.gnu.org> | 2007-05-07 20:37:15 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2007-05-07 20:37:15 +0000 |
commit | 6ca20f85cf0890431f4a2f0bc993d733ccb30bb2 (patch) | |
tree | 4c804414ea5c805f0a4f9e92f8dcc90ceba4479a /libstdc++-v3 | |
parent | 360721e336dbcceb4254ffbc6fd06b655ef3a9ec (diff) | |
download | gcc-6ca20f85cf0890431f4a2f0bc993d733ccb30bb2.zip gcc-6ca20f85cf0890431f4a2f0bc993d733ccb30bb2.tar.gz gcc-6ca20f85cf0890431f4a2f0bc993d733ccb30bb2.tar.bz2 |
stl_algobase.h: Do not include <cstring>.
2007-05-07 Paolo Carlini <pcarlini@suse.de>
* include/bits/stl_algobase.h: Do not include <cstring>.
(copy(const _Tp*, const _Tp*, _Tp*), __copy_b(const _Tp*, const _Tp*,
_Tp*)): Use __builtin_memmove.
(__fill_aux): Use __builtin_memset.
(equal(const _Tp*, const _Tp*, const _Tp*),
lexicographical_compare(const unsigned char*, const unsigned char*,
const unsigned char*, const unsigned char*)): Use __builtin_memcmp.
* include/bits/valarray_array.h: Do not include <cstring>.
(_Array_default_ctor<, true>::_S_do_it): Use __builtin_memset.
(_Array_copy_ctor<, true>::_S_do_it, _Array_copier<, true>::_S_do_it):
Use __builtin_memcpy.
* include/ext/algorithm
(__lexicographical_compare_3way(const unsigned char*,
const unsigned char*, const unsigned char*, const unsigned char*)):
Use __builtin_memcmp.
* testsuite/23_containers/vector/requirements/dr438/
constructor_1_neg.cc: Adjust dg-error line number.
* testsuite/23_containers/vector/requirements/dr438/
constructor_2_neg.cc: Likewise.
From-SVN: r124512
Diffstat (limited to 'libstdc++-v3')
-rw-r--r-- | libstdc++-v3/include/bits/valarray_array.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libstdc++-v3/include/bits/valarray_array.h b/libstdc++-v3/include/bits/valarray_array.h index 84f9a74..128b9de 100644 --- a/libstdc++-v3/include/bits/valarray_array.h +++ b/libstdc++-v3/include/bits/valarray_array.h @@ -1,7 +1,8 @@ // The template and inlines for the -*- C++ -*- internal _Array helper class. -// Copyright (C) 1997, 1998, 1999, 2000, 2003, 2004, 2005, 2006, 2007 -// Free Software Foundation, Inc. +// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, +// 2006, 2007 +// 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 @@ -43,7 +44,6 @@ #include <bits/c++config.h> #include <bits/cpp_type_traits.h> #include <cstdlib> -#include <cstring> #include <new> _GLIBCXX_BEGIN_NAMESPACE(std) @@ -91,7 +91,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) // For fundamental types, it suffices to say 'memset()' inline static void _S_do_it(_Tp* __restrict__ __b, _Tp* __restrict__ __e) - { std::memset(__b, 0, (__e - __b) * sizeof(_Tp)); } + { __builtin_memset(__b, 0, (__e - __b) * sizeof(_Tp)); } }; template<typename _Tp> @@ -160,7 +160,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) inline static void _S_do_it(const _Tp* __restrict__ __b, const _Tp* __restrict__ __e, _Tp* __restrict__ __o) - { std::memcpy(__o, __b, (__e - __b)*sizeof(_Tp)); } + { __builtin_memcpy(__o, __b, (__e - __b) * sizeof(_Tp)); } }; template<typename _Tp> @@ -267,7 +267,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) { inline static void _S_do_it(const _Tp* __restrict__ __a, size_t __n, _Tp* __restrict__ __b) - { std::memcpy (__b, __a, __n * sizeof (_Tp)); } + { __builtin_memcpy(__b, __a, __n * sizeof (_Tp)); } }; // Copy a plain array __a[<__n>] into a play array __b[<>] |