public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Fix some of the mt_allocator testcases on darwin
@ 2004-10-23 16:29 Andrew Pinski
  2004-10-23 19:04 ` Dale Johannesen
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Andrew Pinski @ 2004-10-23 16:29 UTC (permalink / raw)
  To: gcc-patches@gcc.gnu.org Patches; +Cc: libstdc++

[-- Attachment #1: Type: text/plain, Size: 982 bytes --]

The problem is that the testcases use *_t as typedef which is reserved 
by
POSIX and one of them conflicts with Darwin's headers, policy_t.  I 
changed
all the *_t to be named *_type which is consistent with other libstdc++
tests and other mt_allocator tests.

OK?

Thanks,
Andrew Pinski

ChangeLog:

	* testsuite/ext/mt_allocator/deallocate_global-2.c:
	s/value_t/value_type/. s/traits_t/traits_type/.
	s/policy_t/policy_type/. s/allocator_t/allocator_type/.
	s/string_t/string_type/. s/list_t/list_type/.
	* testsuite/ext/mt_allocator/deallocate_global-4.cc: Likewise.
	* testsuite/ext/mt_allocator/deallocate_global_thread-1.cc: Likewise.
	* testsuite/ext/mt_allocator/deallocate_global_thread-3.cc: Likewise.
	* testsuite/ext/mt_allocator/deallocate_local-2.cc: Likewise.
	* testsuite/ext/mt_allocator/deallocate_local-4.cc: Likewise.
	* testsuite/ext/mt_allocator/deallocate_local_thread-1.cc: Likewise.
	* testsuite/ext/mt_allocator/deallocate_local_thread-3.cc: Likewise.
	


[-- Attachment #2: temp.diff.txt --]
[-- Type: text/plain, Size: 9159 bytes --]

? temp.diff.txt
Index: ext/mt_allocator/deallocate_global-2.cc
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_global-2.cc,v
retrieving revision 1.3
diff -u -p -r1.3 deallocate_global-2.cc
--- ext/mt_allocator/deallocate_global-2.cc	12 Oct 2004 01:10:39 -0000	1.3
+++ ext/mt_allocator/deallocate_global-2.cc	23 Oct 2004 15:32:39 -0000
@@ -66,14 +66,14 @@ void operator delete(void* p) throw()
   free(p);
 }
 
-typedef std::string value_t;
-typedef __gnu_cxx::__common_pool_policy<false> policy_t;
-typedef __gnu_cxx::__mt_alloc<value_t, policy_t> allocator_t;
-typedef std::char_traits<value_t> traits_t;
-typedef std::list<value_t, allocator_t> list_t;
+typedef std::string value_type;
+typedef __gnu_cxx::__common_pool_policy<false> policy_type;
+typedef __gnu_cxx::__mt_alloc<value_type, policy_type> allocator_type;
+typedef std::char_traits<value_type> traits_type;
+typedef std::list<value_type, allocator_type> list_type;
 
 // Second.
-list_t l;
+list_type l;
 
 int main()
 {
Index: ext/mt_allocator/deallocate_global-4.cc
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_global-4.cc,v
retrieving revision 1.3
diff -u -p -r1.3 deallocate_global-4.cc
--- ext/mt_allocator/deallocate_global-4.cc	12 Oct 2004 01:10:39 -0000	1.3
+++ ext/mt_allocator/deallocate_global-4.cc	23 Oct 2004 15:32:39 -0000
@@ -67,13 +67,13 @@ void operator delete(void* p) throw()
 }
 
 typedef std::string value_t;
-typedef __gnu_cxx::__per_type_pool_policy<value_t, false> policy_t;
-typedef __gnu_cxx::__mt_alloc<value_t, policy_t> allocator_t;
-typedef std::char_traits<value_t> traits_t;
-typedef std::list<value_t, allocator_t> list_t;
+typedef __gnu_cxx::__per_type_pool_policy<value_t, false> policy_type;
+typedef __gnu_cxx::__mt_alloc<value_t, policy_type> allocator_type;
+typedef std::char_traits<value_t> traits_type;
+typedef std::list<value_t, allocator_type> list_type;
 
 // Second.
-list_t l;
+list_type l;
 
 int main()
 {
Index: ext/mt_allocator/deallocate_global_thread-1.cc
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_global_thread-1.cc,v
retrieving revision 1.3
diff -u -p -r1.3 deallocate_global_thread-1.cc
--- ext/mt_allocator/deallocate_global_thread-1.cc	12 Oct 2004 01:10:39 -0000	1.3
+++ ext/mt_allocator/deallocate_global_thread-1.cc	23 Oct 2004 15:32:39 -0000
@@ -66,14 +66,14 @@ void operator delete(void* p) throw()
   free(p);
 }
 
-typedef std::string value_t;
-typedef __gnu_cxx::__common_pool_policy<true> policy_t;
-typedef __gnu_cxx::__mt_alloc<value_t, policy_t> allocator_t;
-typedef std::char_traits<value_t> traits_t;
-typedef std::list<value_t, allocator_t> list_t;
+typedef std::string value_type;
+typedef __gnu_cxx::__common_pool_policy<true> policy_type;
+typedef __gnu_cxx::__mt_alloc<value_type, policy_type> allocator_type;
+typedef std::char_traits<value_type> traits_type;
+typedef std::list<value_type, allocator_type> list_type;
 
 // Second.
-list_t l;
+list_type l;
 
 int main()
 {
Index: ext/mt_allocator/deallocate_global_thread-3.cc
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_global_thread-3.cc,v
retrieving revision 1.3
diff -u -p -r1.3 deallocate_global_thread-3.cc
--- ext/mt_allocator/deallocate_global_thread-3.cc	12 Oct 2004 01:10:39 -0000	1.3
+++ ext/mt_allocator/deallocate_global_thread-3.cc	23 Oct 2004 15:32:39 -0000
@@ -66,14 +66,14 @@ void operator delete(void* p) throw()
   free(p);
 }
 
-typedef std::string value_t;
-typedef __gnu_cxx::__per_type_pool_policy<value_t, true> policy_t;
-typedef __gnu_cxx::__mt_alloc<value_t, policy_t> allocator_t;
-typedef std::char_traits<value_t> traits_t;
-typedef std::list<value_t, allocator_t> list_t;
+typedef std::string value_type;
+typedef __gnu_cxx::__per_type_pool_policy<value_type, true> policy_type;
+typedef __gnu_cxx::__mt_alloc<value_type, policy_type> allocator_type;
+typedef std::char_traits<value_type> traits_type;
+typedef std::list<value_type, allocator_type> list_type;
 
 // Second.
-list_t l;
+list_type l;
 
 int main()
 {
Index: ext/mt_allocator/deallocate_local-2.cc
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_local-2.cc,v
retrieving revision 1.3
diff -u -p -r1.3 deallocate_local-2.cc
--- ext/mt_allocator/deallocate_local-2.cc	12 Oct 2004 01:10:39 -0000	1.3
+++ ext/mt_allocator/deallocate_local-2.cc	23 Oct 2004 15:32:39 -0000
@@ -64,17 +64,17 @@ void operator delete(void* p) throw()
   free(p);
 }
 
-typedef char value_t;
-typedef std::char_traits<value_t> traits_t;
-typedef __gnu_cxx::__common_pool_policy<false> policy_t;
-typedef __gnu_cxx::__mt_alloc<value_t, policy_t> allocator_t;
-typedef std::basic_string<value_t, traits_t, allocator_t> string_t;
+typedef char value_type;
+typedef std::char_traits<value_type> traits_type;
+typedef __gnu_cxx::__common_pool_policy<false> policy_type;
+typedef __gnu_cxx::__mt_alloc<value_type, policy_type> allocator_type;
+typedef std::basic_string<value_type, traits_type, allocator_type> string_type;
 
 int main()
 {
   bool test __attribute__((unused)) = true;
   {
-    string_t s;
+    string_type s;
     s += "bayou bend";
   }
   return 0;
Index: ext/mt_allocator/deallocate_local-4.cc
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_local-4.cc,v
retrieving revision 1.3
diff -u -p -r1.3 deallocate_local-4.cc
--- ext/mt_allocator/deallocate_local-4.cc	12 Oct 2004 01:10:39 -0000	1.3
+++ ext/mt_allocator/deallocate_local-4.cc	23 Oct 2004 15:32:39 -0000
@@ -64,17 +64,17 @@ void operator delete(void* p) throw()
   free(p);
 }
 
-typedef char value_t;
-typedef std::char_traits<value_t> traits_t;
-typedef __gnu_cxx::__per_type_pool_policy<value_t, false> policy_t;
-typedef __gnu_cxx::__mt_alloc<value_t, policy_t> allocator_t;
-typedef std::basic_string<value_t, traits_t, allocator_t> string_t;
+typedef char value_type;
+typedef std::char_traits<value_type> traits_type;
+typedef __gnu_cxx::__per_type_pool_policy<value_type, false> policy_type;
+typedef __gnu_cxx::__mt_alloc<value_type, policy_type> allocator_type;
+typedef std::basic_string<value_type, traits_type, allocator_type> string_type;
 
 int main()
 {
   bool test __attribute__((unused)) = true;
   {
-    string_t s;
+    string_type s;
     s += "bayou bend";
   }
   return 0;
Index: ext/mt_allocator/deallocate_local_thread-1.cc
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_local_thread-1.cc,v
retrieving revision 1.3
diff -u -p -r1.3 deallocate_local_thread-1.cc
--- ext/mt_allocator/deallocate_local_thread-1.cc	12 Oct 2004 01:10:39 -0000	1.3
+++ ext/mt_allocator/deallocate_local_thread-1.cc	23 Oct 2004 15:32:39 -0000
@@ -64,17 +64,17 @@ void operator delete(void* p) throw()
   free(p);
 }
 
-typedef char value_t;
-typedef std::char_traits<value_t> traits_t;
-typedef __gnu_cxx::__common_pool_policy<true> policy_t;
-typedef __gnu_cxx::__mt_alloc<value_t, policy_t> allocator_t;
-typedef std::basic_string<value_t, traits_t, allocator_t> string_t;
+typedef char value_type;
+typedef std::char_traits<value_type> traits_type;
+typedef __gnu_cxx::__common_pool_policy<true> policy_type;
+typedef __gnu_cxx::__mt_alloc<value_type, policy_type> allocator_type;
+typedef std::basic_string<value_type, traits_type, allocator_type> string_type;
 
 int main()
 {
   bool test __attribute__((unused)) = true;
   {
-    string_t s;
+    string_type s;
     s += "bayou bend";
   }
   return 0;
Index: ext/mt_allocator/deallocate_local_thread-3.cc
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_local_thread-3.cc,v
retrieving revision 1.3
diff -u -p -r1.3 deallocate_local_thread-3.cc
--- ext/mt_allocator/deallocate_local_thread-3.cc	12 Oct 2004 01:10:39 -0000	1.3
+++ ext/mt_allocator/deallocate_local_thread-3.cc	23 Oct 2004 15:32:39 -0000
@@ -64,17 +64,17 @@ void operator delete(void* p) throw()
   free(p);
 }
 
-typedef char value_t;
-typedef std::char_traits<value_t> traits_t;
-typedef __gnu_cxx::__per_type_pool_policy<value_t, true> policy_t;
-typedef __gnu_cxx::__mt_alloc<value_t, policy_t> allocator_t;
-typedef std::basic_string<value_t, traits_t, allocator_t> string_t;
+typedef char value_type;
+typedef std::char_traits<value_type> traits_type;
+typedef __gnu_cxx::__per_type_pool_policy<value_type, true> policy_type;
+typedef __gnu_cxx::__mt_alloc<value_type, policy_type> allocator_type;
+typedef std::basic_string<value_type, traits_type, allocator_type> string_type;
 
 int main()
 {
   bool test __attribute__((unused)) = true;
   {
-    string_t s;
+    string_type s;
     s += "bayou bend";
   }
   return 0;

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Fix some of the mt_allocator testcases on darwin
  2004-10-23 16:29 [PATCH] Fix some of the mt_allocator testcases on darwin Andrew Pinski
@ 2004-10-23 19:04 ` Dale Johannesen
  2004-10-23 19:17   ` Zack Weinberg
  2004-10-23 19:58 ` Benjamin Kosnik
  2004-10-25  8:34 ` Phil Edwards
  2 siblings, 1 reply; 5+ messages in thread
From: Dale Johannesen @ 2004-10-23 19:04 UTC (permalink / raw)
  To: Andrew Pinski; +Cc: Dale Johannesen, gcc-patches@gcc.gnu.org Patches

On Oct 23, 2004, at 8:39 AM, Andrew Pinski wrote:
> The problem is that the testcases use *_t as typedef which is reserved 
> by
> POSIX

Interesting.  gcc has lots of names ending in _t.  Do we need to do
something about that?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Fix some of the mt_allocator testcases on darwin
  2004-10-23 19:04 ` Dale Johannesen
@ 2004-10-23 19:17   ` Zack Weinberg
  0 siblings, 0 replies; 5+ messages in thread
From: Zack Weinberg @ 2004-10-23 19:17 UTC (permalink / raw)
  To: Dale Johannesen; +Cc: Andrew Pinski, gcc-patches@gcc.gnu.org Patches

Dale Johannesen <dalej@apple.com> writes:

> On Oct 23, 2004, at 8:39 AM, Andrew Pinski wrote:
>> The problem is that the testcases use *_t as typedef which is
>> reserved by
>> POSIX
>
> Interesting.  gcc has lots of names ending in _t.  Do we need to do
> something about that?

No.

zw

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Fix some of the mt_allocator testcases on darwin
  2004-10-23 16:29 [PATCH] Fix some of the mt_allocator testcases on darwin Andrew Pinski
  2004-10-23 19:04 ` Dale Johannesen
@ 2004-10-23 19:58 ` Benjamin Kosnik
  2004-10-25  8:34 ` Phil Edwards
  2 siblings, 0 replies; 5+ messages in thread
From: Benjamin Kosnik @ 2004-10-23 19:58 UTC (permalink / raw)
  To: Andrew Pinski; +Cc: gcc-patches, libstdc++


>The problem is that the testcases use *_t as typedef which is reserved 
>by
>POSIX and one of them conflicts with Darwin's headers, policy_t.  I 
>changed
>all the *_t to be named *_type which is consistent with other libstdc++
>tests and other mt_allocator tests.

This is fine, thanks.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Fix some of the mt_allocator testcases on darwin
  2004-10-23 16:29 [PATCH] Fix some of the mt_allocator testcases on darwin Andrew Pinski
  2004-10-23 19:04 ` Dale Johannesen
  2004-10-23 19:58 ` Benjamin Kosnik
@ 2004-10-25  8:34 ` Phil Edwards
  2 siblings, 0 replies; 5+ messages in thread
From: Phil Edwards @ 2004-10-25  8:34 UTC (permalink / raw)
  To: Andrew Pinski; +Cc: gcc-patches@gcc.gnu.org Patches, libstdc++

On Sat, Oct 23, 2004 at 11:39:55AM -0400, Andrew Pinski wrote:
> 
> 	* testsuite/ext/mt_allocator/deallocate_global-2.c:
> 	s/value_t/value_type/. s/traits_t/traits_type/.
> 	s/policy_t/policy_type/. s/allocator_t/allocator_type/.
> 	s/string_t/string_type/. s/list_t/list_type/.

In the future, please use actual English sentences in ChangeLog entries.


-- 
Behind everything some further thing is found, forever; thus the tree behind
the bird, stone beneath soil, the sun behind Urth.  Behind our efforts, let
there be found our efforts.
              - Ascian saying, as related by Loyal to the Group of Seventeen

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-10-25  8:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-23 16:29 [PATCH] Fix some of the mt_allocator testcases on darwin Andrew Pinski
2004-10-23 19:04 ` Dale Johannesen
2004-10-23 19:17   ` Zack Weinberg
2004-10-23 19:58 ` Benjamin Kosnik
2004-10-25  8:34 ` Phil Edwards

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).