This is the mail archive of the gcc@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]

c++ tidiness


The following removes an apparently gratuitous cast of a pointer to
integer to see if it is non-null.  Thus removing noise on Alpha where
this warning is particularly important.


r~


Tue Sep  2 10:27:08 1997  Richard Henderson  <rth@cygnus.com>

	* typeck.c (build_ptrmemfunc1): Clean up ptr->int cast warnings.


Index: gcc/cp/typeck.c
===================================================================
RCS file: /cvs/cvsfiles/egcs/gcc/cp/typeck.c,v
retrieving revision 1.3
diff -u -p -r1.3 typeck.c
--- typeck.c	1997/08/27 08:07:16	1.3
+++ typeck.c	1997/09/02 17:15:19
@@ -6261,14 +6261,14 @@ build_ptrmemfunc1 (type, delta, idx, pfn
   if (pfn)
     {
       allconstant = TREE_CONSTANT (pfn);
-      allsimple = (int) initializer_constant_valid_p (pfn, TREE_TYPE (pfn));
+      allsimple = !! initializer_constant_valid_p (pfn, TREE_TYPE (pfn));
       u = tree_cons (pfn_field, pfn, NULL_TREE);
     }
   else
     {
       delta2 = convert_and_check (delta_type_node, delta2);
       allconstant = TREE_CONSTANT (delta2);
-      allsimple = (int) initializer_constant_valid_p (delta2, TREE_TYPE (delta2));
+      allsimple = !! initializer_constant_valid_p (delta2, TREE_TYPE (delta2));
       u = tree_cons (delta2_field, delta2, NULL_TREE);
     }
 


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