public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Jeff Law <jeffreyalaw@gmail.com>
Cc: gcc-patches@gcc.gnu.org
Subject: [PATCH] pch: Small cleanup
Date: Fri, 10 Dec 2021 13:56:13 +0100	[thread overview]
Message-ID: <20211210125613.GO2646553@tucnak> (raw)
In-Reply-To: <20211209165954.GJ2646553@tucnak>

On Thu, Dec 09, 2021 at 05:59:54PM +0100, Jakub Jelinek via Gcc-patches wrote:
> > /tmp/6140018_6.tmpdir/aci-gcc-fsf/sources/gcc-fsf/gccsrc/gcc/config/aarch64/aarch64-sve-builtins.cc:3920:0:
> > ./gt-aarch64-sve-builtins.h: In function 'void
> > gt_pch_p_19registered_function(void*, void*, gt_pointer_operator, void*)':
> > ./gt-aarch64-sve-builtins.h:86:44: error: no matching function for call to
> > 'gt_pch_nx(aarch64_sve::function_instance*, void (*&)(void*, void*, void*),
> > void*&)'
> >      gt_pch_nx (&((*x).instance), op, cookie);
> 
> Fixed thusly, compile tested on x86_64-linux, committed to trunk.

Here is a small cleanup.  IMHO we should use gt_pointer_operator instead of
specifying manually void (*) (void *, void *) or
void (*) (void *, void *, void *) so that next time we want to change it,
we don't have to trace all the spots.  I was afraid it wouldn't work due to
header dependencies, but it works well.  gengtype generated files also
use gt_pointer_operator.

Ok for trunk (tested on x86_64-linux and cross to aarch64-linux)?

2021-12-10  Jakub Jelinek  <jakub@redhat.com>

	* machmode.h (gt_pch_nx): Use gt_pointer_operator as type of second
	argument instead of equivalent void (*) (void *, void *, void *).
	* poly-int.h (gt_pch_nx): Likewise.
	* wide-int.h (gt_pch_nx): Likewise.
	* config/aarch64/aarch64-sve-builtins.cc (gt_pch_nx): Likewise.

--- gcc/machmode.h.jj	2021-12-09 15:40:06.145023853 +0100
+++ gcc/machmode.h	2021-12-10 13:40:47.858430024 +0100
@@ -1199,7 +1199,7 @@ gt_pch_nx (pod_mode<T> *)
 
 template<typename T>
 void
-gt_pch_nx (pod_mode<T> *, void (*) (void *, void *, void *), void *)
+gt_pch_nx (pod_mode<T> *, gt_pointer_operator, void *)
 {
 }
 
--- gcc/poly-int.h.jj	2021-12-09 15:40:06.159023652 +0100
+++ gcc/poly-int.h	2021-12-10 13:41:05.476178926 +0100
@@ -2717,7 +2717,7 @@ gt_pch_nx (poly_int_pod<N, C> *)
 
 template<unsigned int N, typename C>
 void
-gt_pch_nx (poly_int_pod<N, C> *, void (*) (void *, void *, void *), void *)
+gt_pch_nx (poly_int_pod<N, C> *, gt_pointer_operator, void *)
 {
 }
 
--- gcc/wide-int.h.jj	2021-12-09 15:40:06.218022803 +0100
+++ gcc/wide-int.h	2021-12-10 13:41:35.405752355 +0100
@@ -3338,7 +3338,7 @@ gt_pch_nx (generic_wide_int <T> *)
 
 template<typename T>
 void
-gt_pch_nx (generic_wide_int <T> *, void (*) (void *, void *, void *), void *)
+gt_pch_nx (generic_wide_int <T> *, gt_pointer_operator, void *)
 {
 }
 
@@ -3356,7 +3356,7 @@ gt_pch_nx (trailing_wide_ints <N> *)
 
 template<int N>
 void
-gt_pch_nx (trailing_wide_ints <N> *, void (*) (void *, void *, void *), void *)
+gt_pch_nx (trailing_wide_ints <N> *, gt_pointer_operator, void *)
 {
 }
 
--- gcc/config/aarch64/aarch64-sve-builtins.cc.jj	2021-12-09 17:56:53.445371821 +0100
+++ gcc/config/aarch64/aarch64-sve-builtins.cc	2021-12-10 13:42:03.112357466 +0100
@@ -3913,7 +3913,7 @@ gt_pch_nx (function_instance *)
 }
 
 inline void
-gt_pch_nx (function_instance *, void (*) (void *, void *, void *), void *)
+gt_pch_nx (function_instance *, gt_pointer_operator, void *)
 {
 }
 


	Jakub


  reply	other threads:[~2021-12-10 12:56 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-07  9:55 [PATCH] pch: Add support for relocation of the PCH data [PR71934] Jakub Jelinek
2021-12-07 14:50 ` Jakub Jelinek
2021-12-08  8:00   ` Iain Sandoe
2021-12-08 23:10     ` Jeff Law
2021-12-09 14:59     ` Jakub Jelinek
2021-12-09 15:03       ` Iain Sandoe
2021-12-09 16:42       ` Christophe Lyon
2021-12-09 16:52         ` Jeff Law
2021-12-09 16:59         ` [committed] pch: Fix aarch64 build [PR71934] Jakub Jelinek
2021-12-10 12:56           ` Jakub Jelinek [this message]
2021-12-10 21:20             ` [PATCH] pch: Small cleanup Jeff Law
2021-12-08 23:09 ` [PATCH] pch: Add support for relocation of the PCH data [PR71934] Jeff Law
2021-12-10  1:20   ` Eric Gallager

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211210125613.GO2646553@tucnak \
    --to=jakub@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jeffreyalaw@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).