From 6f62aa54d07f7002a124f9ad8f19a74dd2f7688c Mon Sep 17 00:00:00 2001 From: paolo Date: Wed, 24 Oct 2007 15:21:22 +0000 Subject: [PATCH] 2007-10-24 Paolo Carlini * include/tr1_impl/array (_M_instance): Align naturally. * testsuite/ext/array_allocator/1.cc: Use ext/vstring, more solid than our current basic_string vs alignment. * testsuite/ext/array_allocator/2.cc: Likewise. * testsuite/ext/array_allocator/3.cc: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@129604 138bc75d-0d04-0410-961f-82ee72b054a4 --- libstdc++-v3/ChangeLog | 8 ++++++++ libstdc++-v3/include/tr1_impl/array | 2 +- libstdc++-v3/testsuite/ext/array_allocator/1.cc | 10 +++++----- libstdc++-v3/testsuite/ext/array_allocator/2.cc | 8 ++++---- libstdc++-v3/testsuite/ext/array_allocator/3.cc | 8 ++++---- 5 files changed, 22 insertions(+), 14 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index e7d18fdd4b4..3616d367d6a 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,11 @@ +2007-10-24 Paolo Carlini + + * include/tr1_impl/array (_M_instance): Align naturally. + * testsuite/ext/array_allocator/1.cc: Use ext/vstring, + more solid than our current basic_string vs alignment. + * testsuite/ext/array_allocator/2.cc: Likewise. + * testsuite/ext/array_allocator/3.cc: Likewise. + 2007-10-20 Paolo Carlini * include/bits/stl_move.h (_GLIBCXX_MOVE): Wrap in parentheses. diff --git a/libstdc++-v3/include/tr1_impl/array b/libstdc++-v3/include/tr1_impl/array index 83cad1511f3..425b87cffbb 100644 --- a/libstdc++-v3/include/tr1_impl/array +++ b/libstdc++-v3/include/tr1_impl/array @@ -52,7 +52,7 @@ _GLIBCXX_BEGIN_NAMESPACE_TR1 typedef std::reverse_iterator const_reverse_iterator; // Support for zero-sized arrays mandatory. - value_type _M_instance[_Nm ? _Nm : 1] __attribute__((__aligned__)); + value_type _M_instance[_Nm ? _Nm : 1]; // No explicit construct/copy/destroy for aggregate type. diff --git a/libstdc++-v3/testsuite/ext/array_allocator/1.cc b/libstdc++-v3/testsuite/ext/array_allocator/1.cc index 84a6c197ec8..8b7bcbde2af 100644 --- a/libstdc++-v3/testsuite/ext/array_allocator/1.cc +++ b/libstdc++-v3/testsuite/ext/array_allocator/1.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2004 Free Software Foundation, Inc. +// Copyright (C) 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 @@ -25,7 +25,7 @@ // invalidate any other reasons why the executable file might be covered by // the GNU General Public License. -#include +#include #include #include @@ -38,10 +38,10 @@ array_type extern_array; void test01() { bool test __attribute__((unused)) = true; - - using std::basic_string; + + using __gnu_cxx::__versa_string; typedef __gnu_cxx::array_allocator allocator_type; - typedef basic_string string_type; + typedef __versa_string string_type; allocator_type a(&extern_array); string_type s(a); diff --git a/libstdc++-v3/testsuite/ext/array_allocator/2.cc b/libstdc++-v3/testsuite/ext/array_allocator/2.cc index f3b30947812..01702e792e8 100644 --- a/libstdc++-v3/testsuite/ext/array_allocator/2.cc +++ b/libstdc++-v3/testsuite/ext/array_allocator/2.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc. +// Copyright (C) 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 @@ -25,8 +25,8 @@ // invalidate any other reasons why the executable file might be covered by // the GNU General Public License. -#include #include +#include #include #include @@ -40,9 +40,9 @@ void test01() { bool test __attribute__((unused)) = true; - using std::basic_string; + using __gnu_cxx::__versa_string; typedef __gnu_cxx::array_allocator allocator_type; - typedef basic_string string_type; + typedef __versa_string string_type; allocator_type a(&extern_array); string_type s(a); diff --git a/libstdc++-v3/testsuite/ext/array_allocator/3.cc b/libstdc++-v3/testsuite/ext/array_allocator/3.cc index c9fa348a537..81f8bbd1d15 100644 --- a/libstdc++-v3/testsuite/ext/array_allocator/3.cc +++ b/libstdc++-v3/testsuite/ext/array_allocator/3.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2004 Free Software Foundation, Inc. +// Copyright (C) 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 @@ -25,7 +25,7 @@ // invalidate any other reasons why the executable file might be covered by // the GNU General Public License. -#include +#include #include #include @@ -39,9 +39,9 @@ void test01() { bool test __attribute__((unused)) = true; - using std::basic_string; + using __gnu_cxx::__versa_string; typedef __gnu_cxx::array_allocator allocator_type; - typedef basic_string string_type; + typedef __versa_string string_type; // Construct array_allocator without underlying array. allocator_type a; -- 2.11.0