From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 777D23858286; Thu, 21 Dec 2023 01:50:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 777D23858286 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1703123449; bh=YevzvuxAfRcYeJt7Y9DKCCXNRAm2gRpObZKhepmcacY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=BkyD+AJBZmP+MlDuRMQ51Pw+k4fL+EFJlKD3oiyeO5CKVc70QHMkj59XgP5ULcQtL 1lvo1nqUcplUHjn3fbbKS231qL4Fp8sQs94W0KIgfmdE3QfNShTCE7c7kSah6cnkPQ M1K2dzJ6HlfKndJ0iNqYOg3TbsTR1bYICywXFApI= From: "hp at sourceware dot org" To: gdb-prs@sourceware.org Subject: [Bug sim/31181] sim: cris: decode unused base_insn variable warnings Date: Thu, 21 Dec 2023 01:50:49 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: sim X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: hp at sourceware dot org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D31181 --- Comment #7 from Hans-Peter Nilsson --- (In reply to Tom Tromey from comment #6) > I tend to think the cris one is a bug in cgen. I won't comment on the bugginess part, but it's a valid view, and certainly= so if cgen strives to generate warning-free code. > In particular /gen-extract-case does: >=20 > (if (> (length (sfmt-iflds sfmt)) 0) > (string-append > " CGEN_INSN_WORD insn =3D " > (if (adata-integral-insn? CURRENT-ARCH) > "entire_insn;\n" > "base_insn;\n")) > "") >=20 > ... but I think in this case, because the ifield > is constant, later code doesn't emit any use of 'insn'. IOW, but more precise about the location, thanks. (And actually "more correct", as I looked at /gen-decode-fn.) To wit along my suggestion above, hacked (or solved) by adding "(void) insn= ;" as another parameter to the string-append call (if I RTF-guile-M correctly)= .=20 Plus at least the suggested comment to aid casual readers. --=20 You are receiving this mail because: You are on the CC list for the bug.=