From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id IFw5BNbkrWU+lQMAWB0awg (envelope-from ) for ; Sun, 21 Jan 2024 22:45:26 -0500 Received: by simark.ca (Postfix, from userid 112) id 0EC021E0C3; Sun, 21 Jan 2024 22:45:26 -0500 (EST) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id F0BAC1E098 for ; Sun, 21 Jan 2024 22:45:23 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6A8DC3858C33 for ; Mon, 22 Jan 2024 03:45:23 +0000 (GMT) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by sourceware.org (Postfix) with ESMTP id 395D43858C50 for ; Mon, 22 Jan 2024 03:45:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 395D43858C50 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gentoo.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gentoo.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 395D43858C50 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2001:470:ea4a:1:5054:ff:fec7:86e4 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705895106; cv=none; b=GdnAgGuCqE4uYT5xDZQ3oLBkfn+F1rgEEwfkGC10IKAHKnH+mbqDxc7zmMfVBPchBcCwHCaPLes4w+vduIymY9ojAfGOUUIJlathOf9peWeE2dy8HHpbC63MdyamlsBliLd47/IQXKrZ2R5z00+j6mkZSc85zY/HPM7lOmrZLOY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705895106; c=relaxed/simple; bh=R3ljhBrHrBdZ+SMWBDgQlUxvuJgcd7VXuPFjCxl6Ppk=; h=Date:From:To:Subject:Message-ID:MIME-Version; b=DwiMwe6vhfoim32bywqQ5uiXH7f8ZsSvGSQSdReOfAk93a5wqic4UGVJ/fIjfB3ZB+EpP16i3nOXTeOdFdup6LRazgoK2jnnqqxNQftu6H9lGacB1OIiMOUXTsxzyldv6RCHyzVXOQQoInAM+wgunmZBjtuFC8Ket4e7S+cwXow= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by smtp.gentoo.org (Postfix, from userid 559) id DD61834318D; Mon, 22 Jan 2024 03:45:04 +0000 (UTC) Date: Sun, 21 Jan 2024 22:45:03 -0500 From: Mike Frysinger To: Mark Wielaard Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] sim: Fix -Wincompatible-pointer-types in frv/sem.c Message-ID: References: <20240121230620.575972-1-mark@klomp.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="pLsmhPmFZjhSRtwL" Content-Disposition: inline In-Reply-To: <20240121230620.575972-1-mark@klomp.org> X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org --pLsmhPmFZjhSRtwL Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 22 Jan 2024 00:06, Mark Wielaard wrote: > GCC errors on -Wincompatible-pointer-types >=20 > sim/frv/sem.c: In function =E2=80=98frvbf_sem_mmachu=E2=80=99: > sim/frv/sem.c:24345:41: error: passing argument 2 of =E2=80=98sim_queue_f= n_di_write=E2=80=99 from incompatible pointer type [-Wincompatible-pointer-= types] > 24345 | sim_queue_fn_di_write (current_cpu, frvbf_h_acc40U_set, FLD (= f_ACC40Uk), opval); > | ^~~~~~~~~~~~~~~~~~ > | | > | void (*)(SIM_CPU *, UINT,= UDI) {aka void (*)(struct _sim_cpu *, unsigned int, long unsigned int)} > In file included from ../../binutils-gdb/sim/common/cgen-cpu.h:25, > from ../../binutils-gdb/sim/common/sim-cpu.h:32, > from ../../binutils-gdb/sim/common/sim-base.h:90, > from ../../binutils-gdb/sim/frv/sim-main.h:41, > from ../../binutils-gdb/sim/frv/sem.c:28: > ../../binutils-gdb/sim/common/cgen-par.h:195:47: note: expected =E2=80=98= void (*)(SIM_CPU *, UINT, DI)=E2=80=99 {aka =E2=80=98void (*)(struct _sim_= cpu *, unsigned int, long int)=E2=80=99} but argument is of type =E2=80=98= void (*)(SIM_CPU *, UINT, UDI)=E2=80=99 {aka =E2=80=98void (*)(struct _sim= _cpu *, unsigned int, long unsigned int)=E2=80=99} > 195 | extern void sim_queue_fn_di_write (SIM_CPU *, void (*)(SIM_CPU *,= UINT, DI), UINT, DI); > | ^~~~~~~~~~~~~~~~~~~= ~~~~~~~~~~ >=20 > The issue is that sim_queue_fn_di_write takes a function with a DI argume= nt > but frvbf_h_acc40U_set takes a UDI. Since there is no sim_queue_fn that > takes a UDI just define frvbf_h_acc40U_set as if it takes a DI. > --- > sim/frv/cpu.c | 2 +- > sim/frv/cpu.h | 2 +- unfortunately this doesn't work as cpu.[ch] is generated. https://sourceware.org/pipermail/gdb-patches/2023-December/205492.html https://sourceware.org/PR29752 -mike --pLsmhPmFZjhSRtwL Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEuQK1JxMl+JKsJRrUQWM7n+g39YEFAmWt5L8ACgkQQWM7n+g3 9YG1fQ/+MBwrlxRY1MwSrlAeXKLeIybBIggpG79gg8h+ruEjMjUucwznjIcopkQN zS83FXJ8E0eCgPFwprthrQRXLdv/04nqH3FzKQkLoWQ3XDRQEsbX/FcAxw8A7+RF URZC1yiktY1Y+XXQzwLNc03he7pr3KI7h/WeY2JWb/sLIUHrl+NhBLZDm0fjfq3O PB63ys2WfFy53JggOi7JhD5uYQe58o1mHUgoHfUzwaSomExmqxMPFXVzL7gdqfR1 rUx3kJwxSffo8wARrZIqVfU2RTdYfjEpiSs4+H5Hu7Wm/K+KSrm5GWRRkvRIAFBS dXyg/no0HDzSwyc6/x/YVJuCNHqPXROJF1W28qXfcnZWBEoOU23RLuArQZn6jWMP Bs4kPH1m6VGAqVI0dMqJp4/JgaEGmRQGXanuNVJMj29DPgt9PcUI43WhzWRVSLbW xJZyjQfY+I8zoJ3ZZo/nmrPUBmGsZ0AVAJeti6wTG+7XOQG2L1ZPw0SFcEASvRi/ sZAe5Q/rRilct5OFYNS58Ibsr/R3nkqlkOwVrGFiKy6NrA/bKFPoWt4Uw6TsyUG4 8COiDHBldENBG5opM39kA6f3ogajG+Qcz4x7coewlAMB5FQ0P2JroSpqpyu9gYiw NOcyQRDs3kXvQlopLzf6nrQUiLPswbYhBEweE+YopWJfzzef+GY= =IZEX -----END PGP SIGNATURE----- --pLsmhPmFZjhSRtwL--