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]

Re: [PATCH] pch bug fix (take 2, PR pch/59436)


On Jan 1, 2014, at 3:08 PM, Jakub Jelinek <jakub@redhat.com> wrote:
>   if (memcmp (tmp_optabs, this_target_optabs, sizeof (struct target_optabs)))
> -    TREE_OPTIMIZATION_OPTABS (optnode) = (unsigned char *) tmp_optabs;
> +    TREE_OPTIMIZATION_OPTABS (optnode) = (void *) tmp_optabs;

Oh, the cast isn't necessary.

diff --git a/gcc/optabs.c b/gcc/optabs.c
index 24e75d5..3958735 100644
--- a/gcc/optabs.c
+++ b/gcc/optabs.c
@@ -6242,7 +6242,7 @@ init_tree_optimization_optabs (tree optnode)
 
   /* If the optabs changed, record it.  */
   if (memcmp (tmp_optabs, this_target_optabs, sizeof (struct target_optabs)))
-    TREE_OPTIMIZATION_OPTABS (optnode) = (unsigned char *) tmp_optabs;
+    TREE_OPTIMIZATION_OPTABS (optnode) = tmp_optabs;
   else
     {
       TREE_OPTIMIZATION_OPTABS (optnode) = NULL;

is fine.

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