* [v3] Small change to array
@ 2007-10-24 16:03 Paolo Carlini
0 siblings, 0 replies; only message in thread
From: Paolo Carlini @ 2007-10-24 16:03 UTC (permalink / raw)
To: Gcc Patch List
[-- Attachment #1: Type: text/plain, Size: 135 bytes --]
Hi,
following up to a recent message to libstdc++@ I applied to mainline the
below.
Tested x86_64-linux.
Paolo.
//////////////////
[-- Attachment #2: CL_array_align --]
[-- Type: text/plain, Size: 315 bytes --]
2007-10-24 Paolo Carlini <pcarlini@suse.de>
* 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.
[-- Attachment #3: patch_array_align --]
[-- Type: text/plain, Size: 4118 bytes --]
Index: include/tr1_impl/array
===================================================================
--- include/tr1_impl/array (revision 129602)
+++ include/tr1_impl/array (working copy)
@@ -52,7 +52,7 @@
typedef std::reverse_iterator<const_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.
Index: testsuite/ext/array_allocator/1.cc
===================================================================
--- testsuite/ext/array_allocator/1.cc (revision 129599)
+++ testsuite/ext/array_allocator/1.cc (working copy)
@@ -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 <string>
+#include <ext/vstring.h>
#include <ext/array_allocator.h>
#include <testsuite_hooks.h>
@@ -38,10 +38,10 @@
void test01()
{
bool test __attribute__((unused)) = true;
-
- using std::basic_string;
+
+ using __gnu_cxx::__versa_string;
typedef __gnu_cxx::array_allocator<char_type, array_type> allocator_type;
- typedef basic_string<char_type, traits_type, allocator_type> string_type;
+ typedef __versa_string<char_type, traits_type, allocator_type> string_type;
allocator_type a(&extern_array);
string_type s(a);
Index: testsuite/ext/array_allocator/2.cc
===================================================================
--- testsuite/ext/array_allocator/2.cc (revision 129599)
+++ testsuite/ext/array_allocator/2.cc (working copy)
@@ -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 <string>
#include <iostream>
+#include <ext/vstring.h>
#include <ext/array_allocator.h>
#include <testsuite_hooks.h>
@@ -40,9 +40,9 @@
{
bool test __attribute__((unused)) = true;
- using std::basic_string;
+ using __gnu_cxx::__versa_string;
typedef __gnu_cxx::array_allocator<char_type, array_type> allocator_type;
- typedef basic_string<char_type, traits_type, allocator_type> string_type;
+ typedef __versa_string<char_type, traits_type, allocator_type> string_type;
allocator_type a(&extern_array);
string_type s(a);
Index: testsuite/ext/array_allocator/3.cc
===================================================================
--- testsuite/ext/array_allocator/3.cc (revision 129599)
+++ testsuite/ext/array_allocator/3.cc (working copy)
@@ -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 <string>
+#include <ext/vstring.h>
#include <ext/array_allocator.h>
#include <testsuite_hooks.h>
@@ -39,9 +39,9 @@
{
bool test __attribute__((unused)) = true;
- using std::basic_string;
+ using __gnu_cxx::__versa_string;
typedef __gnu_cxx::array_allocator<char_type, array_type> allocator_type;
- typedef basic_string<char_type, traits_type, allocator_type> string_type;
+ typedef __versa_string<char_type, traits_type, allocator_type> string_type;
// Construct array_allocator without underlying array.
allocator_type a;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-10-24 15:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-10-24 16:03 [v3] Small change to array Paolo Carlini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).