From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5EC253858282; Sat, 24 Feb 2024 10:00:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5EC253858282 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1708768828; bh=sLZLATxWlyVEtVtai2oLQ31mwndVoRlzvV4XiDFG3gk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Ad572qywBYaUiyBB4ArKI2sM1MC1NaoxqyqI7dFc5GXjUfJySYlNlc65wj1Hj/lEC aLhCROdVrwK8eaTm6eoVu94PPVJHZ2sOCPsCa/2MsRUFUznLsCjjK7QCkeGCbyZNdx 5tPJJVMFe7n8YW0c6Kxx6fSLHGcfT5ICz+sY/dWU= From: "cvs-commit at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug build/31399] Build fails on macOS: error: cannot cast 'tui_win_info *' to 'tui_cmd_window *' via virtual base 'tui_win_info' Date: Sat, 24 Feb 2024 10:00:25 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: build X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED 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=3D31399 --- Comment #2 from Sourceware Commits --- The master branch has been updated by Tom de Vries : https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D6fe4779ac4b1= 874c995345e3eabd89cb1a05fbdf commit 6fe4779ac4b1874c995345e3eabd89cb1a05fbdf Author: Tom de Vries Date: Sat Feb 24 11:00:20 2024 +0100 [gdb/build] Fix static cast of virtual base With this change in bfd/development.sh: ... -development=3Dtrue +development=3Dfalse ... we run into: ... In file included from tui-data.h:28:0, from tui-command.c:24: gdb-checked-static-cast.h: In instantiation of \ =C3=A2T gdb::checked_static_cast(V*) [with T =3D tui_cmd_window*; V = =3D tui_win_info]=C3=A2: tui-command.c:65:15: required from here gdb-checked-static-cast.h:63:14: error: cannot convert from pointer to = base \ class =C3=A2tui_win_info=C3=A2 to pointer to derived class =C3=A2tui_= cmd_window=C3=A2 because \ the base is virtual T result =3D static_cast (v); ^~~~~~~~~~~~~~~~~~ ... Fix this by using dynamic_cast instead of gdb::checked_static_cast in TUI_CMD_WIN and TUI_STATUS_WIN. Tested on x86_64-linux, with development set to false. Reported-By: Robert Xiao Reported-By: Simon Marchi Approved-By: Tom Tromey PR build/31399 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=3D31399 --=20 You are receiving this mail because: You are on the CC list for the bug.=