public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug tui/31399] New: Build fails on macOS: error: cannot cast 'tui_win_info *' to 'tui_cmd_window *' via virtual base 'tui_win_info'
@ 2024-02-19  3:08 spam_hole at shaw dot ca
  2024-02-19 14:34 ` [Bug tui/31399] " ssbssa at sourceware dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: spam_hole at shaw dot ca @ 2024-02-19  3:08 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=31399

            Bug ID: 31399
           Summary: Build fails on macOS: error: cannot cast 'tui_win_info
                    *' to 'tui_cmd_window *' via virtual base
                    'tui_win_info'
           Product: gdb
           Version: HEAD
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: tui
          Assignee: unassigned at sourceware dot org
          Reporter: spam_hole at shaw dot ca
  Target Milestone: ---

Building binutils+gdb from binutils-2.42 source fails with the following error:

======== 8< ========
In file included from ../../gdb/tui/tui-command.c:24:
In file included from ../../gdb/tui/tui-data.h:28:
../../gdb/../gdbsupport/gdb-checked-static-cast.h:63:14: error: cannot cast
'tui_win_info *' to 'tui_cmd_window *' via virtual base 'tui_win_info'
  T result = static_cast<T> (v);
             ^~~~~~~~~~~~~~~~~~
../../gdb/tui/tui-command.c:65:15: note: in instantiation of function template
specialization 'gdb::checked_static_cast<tui_cmd_window *, tui_win_info>'
requested here
  WINDOW *w = TUI_CMD_WIN->handle.get ();
              ^
../../gdb/tui/tui-data.h:299:9: note: expanded from macro 'TUI_CMD_WIN'
  (gdb::checked_static_cast<tui_cmd_window *> (tui_win_list[CMD_WIN]))
        ^
1 error generated.
======== 8< ========

Build fails with Apple clang version 15.0.0 (clang-1500.1.0.2.5) on macOS
13.6.1 (22G313).

This is a regression apparently originating in commit
85a427b26c5cae6af6ed0b4358d44a77b5a3b2c0
(https://git.libre-soc.org/?p=binutils-gdb.git;a=commit;h=85a427b26c5cae6af6ed0b4358d44a77b5a3b2c0).
I believe dynamic_cast is needed instead of static_cast.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-03-19 14:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-19  3:08 [Bug tui/31399] New: Build fails on macOS: error: cannot cast 'tui_win_info *' to 'tui_cmd_window *' via virtual base 'tui_win_info' spam_hole at shaw dot ca
2024-02-19 14:34 ` [Bug tui/31399] " ssbssa at sourceware dot org
2024-02-22 15:06 ` [Bug build/31399] " vries at gcc dot gnu.org
2024-02-22 16:19 ` vries at gcc dot gnu.org
2024-02-24 10:00 ` cvs-commit at gcc dot gnu.org
2024-02-24 10:01 ` vries at gcc dot gnu.org
2024-03-19 14:57 ` cvs-commit at gcc dot gnu.org

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).