This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Patch/RFA] libstdc++/21554


Hi,

ok, attributes don't work with dependent expressions and, moreover, the
alignment attribute doesn't work with typedefs, but at least the below
minimal use is fine and I cannot see any major disadvantage: if I
understand the issue, it would fix once and for all the long standing
troubles with ext/array_allocator/2.cc on various targets.

Tested x86-linux, seems suitable for 4_1 too.

Paolo.

////////////////
2006-01-31  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/21554
	* include/tr1/array (array<>): Maximally align _M_instance.
	* testsuite/ext/array_allocator/2.cc: Do not xfail for powerpc.
Index: include/tr1/array
===================================================================
--- include/tr1/array	(revision 110398)
+++ include/tr1/array	(working copy)
@@ -1,6 +1,6 @@
 // class template array -*- C++ -*-
 
-// Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005, 2006 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
@@ -64,7 +64,7 @@
       enum { _S_index = _Nm };
 
       // Support for zero-sized arrays mandatory.
-      value_type _M_instance[_Nm ? _Nm : 1];
+      value_type _M_instance[_Nm ? _Nm : 1] __attribute__((__aligned__));
 
       // No explicit construct/copy/destroy for aggregate type.
 
Index: testsuite/ext/array_allocator/2.cc
===================================================================
--- testsuite/ext/array_allocator/2.cc	(revision 110398)
+++ testsuite/ext/array_allocator/2.cc	(working copy)
@@ -1,7 +1,4 @@
-// Expected execution error for PR19495.
-// { dg-do run { xfail powerpc*-*-linux* } }
-
-// Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+// Copyright (C) 2004, 2005, 2006 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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]