This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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]

[v3] Avoid some more -O2 -g -Wall warnings


Hi,

with this one only three remain, in ext/pb_ds.

Paolo.

//////////////////
2009-06-22  Paolo Carlini  <paolo.carlini@oracle.com>

	* testsuite/util/testsuite_common_types.h (bitwise_operators,
	bitwise_assignment_operators): Initialize a and b.
	(struct has_bitwise_operators): Do not call the latter.
	* testsuite/29_atomics/atomic_integral/cons/assign_neg.cc: Adjust
	dg-error line numbers.
	* testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
	* testsuite/29_atomics/atomic/cons/assign_neg.cc: Likewise.
	* testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
Index: testsuite/29_atomics/atomic_integral/cons/assign_neg.cc
===================================================================
--- testsuite/29_atomics/atomic_integral/cons/assign_neg.cc	(revision 148800)
+++ testsuite/29_atomics/atomic_integral/cons/assign_neg.cc	(working copy)
@@ -30,11 +30,11 @@
   return 0;
 }
 
-// { dg-error "used here" "" { target *-*-* } 521 }
+// { dg-error "used here" "" { target *-*-* } 525 }
 // { dg-excess-errors "deleted function" } 
 // { dg-excess-errors "deleted function" } 
 // { dg-error "instantiated from" "" { target *-*-* } 29 } 
-// { dg-error "instantiated from" "" { target *-*-* } 528 } 
+// { dg-error "instantiated from" "" { target *-*-* } 532 } 
 // { dg-error "instantiated from" "" { target *-*-* } 170 } 
 // { dg-error "instantiated from" "" { target *-*-* } 399 }
 // { dg-error "instantiated from" "" { target *-*-* } 168 }  
Index: testsuite/29_atomics/atomic_integral/cons/copy_neg.cc
===================================================================
--- testsuite/29_atomics/atomic_integral/cons/copy_neg.cc	(revision 148800)
+++ testsuite/29_atomics/atomic_integral/cons/copy_neg.cc	(working copy)
@@ -30,11 +30,11 @@
   return 0;
 }
 
-// { dg-error "used here" "" { target *-*-* } 560 }
+// { dg-error "used here" "" { target *-*-* } 564 }
 // { dg-excess-errors "deleted function" } 
 // { dg-excess-errors "deleted function" } 
 // { dg-error "instantiated from" "" { target *-*-* } 29 } 
-// { dg-error "instantiated from" "" { target *-*-* } 566 } 
+// { dg-error "instantiated from" "" { target *-*-* } 570 } 
 // { dg-error "instantiated from" "" { target *-*-* } 170 } 
 // { dg-error "instantiated from" "" { target *-*-* } 399 }
 // { dg-error "instantiated from" "" { target *-*-* } 168 }  
Index: testsuite/29_atomics/atomic/cons/assign_neg.cc
===================================================================
--- testsuite/29_atomics/atomic/cons/assign_neg.cc	(revision 148800)
+++ testsuite/29_atomics/atomic/cons/assign_neg.cc	(working copy)
@@ -29,7 +29,7 @@
   return 0;
 }
 
-// { dg-error "used here" "" { target *-*-* } 521 }
+// { dg-error "used here" "" { target *-*-* } 525 }
 // { dg-error "deleted function" "" { target *-*-* } 239 }
 // { dg-error "deleted function" "" { target *-*-* } 257 }
 // { dg-error "deleted function" "" { target *-*-* } 275 } 
Index: testsuite/29_atomics/atomic/cons/copy_neg.cc
===================================================================
--- testsuite/29_atomics/atomic/cons/copy_neg.cc	(revision 148800)
+++ testsuite/29_atomics/atomic/cons/copy_neg.cc	(working copy)
@@ -29,7 +29,7 @@
   return 0;
 }
 
-// { dg-error "used here" "" { target *-*-* } 560 } 
+// { dg-error "used here" "" { target *-*-* } 564 } 
 // { dg-error "deleted function" "" { target *-*-* } 238 }
 // { dg-error "deleted function" "" { target *-*-* } 256 }
 // { dg-error "deleted function" "" { target *-*-* } 274 }
Index: testsuite/util/testsuite_common_types.h
===================================================================
--- testsuite/util/testsuite_common_types.h	(revision 148800)
+++ testsuite/util/testsuite_common_types.h	(working copy)
@@ -387,8 +387,8 @@
     void
     bitwise_operators()
     {
-      _Tp a; 
-      _Tp b;
+      _Tp a = _Tp();
+      _Tp b = _Tp();
       a | b;
       a & b;
       a ^ b;
@@ -399,8 +399,8 @@
     void
     bitwise_assignment_operators()
     {
-      _Tp a; 
-      _Tp b;
+      _Tp a = _Tp();
+      _Tp b = _Tp();
       a |= b; // set
       a &= ~b; // clear
       a ^= b;
@@ -426,7 +426,11 @@
 	{
 	  void __constraint()
 	  {
-	    bitwise_assignment_operators<_Tp>();
+	    _Tp a;
+	    _Tp b;
+	    a |= b; // set
+	    a &= ~b; // clear
+	    a ^= b;
 	  }
 	};
 

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