diff options
author | Tom de Vries <tdevries@suse.de> | 2024-02-24 11:00:20 +0100 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2024-02-24 11:00:20 +0100 |
commit | 6fe4779ac4b1874c995345e3eabd89cb1a05fbdf (patch) | |
tree | a1c731d86b52cf80462c5066a493b2fecb1a462f /gdb/s390-tdep.c | |
parent | 086c8f406d82ce171d5867eed93f1308e07252c5 (diff) | |
download | gdb-6fe4779ac4b1874c995345e3eabd89cb1a05fbdf.zip gdb-6fe4779ac4b1874c995345e3eabd89cb1a05fbdf.tar.gz gdb-6fe4779ac4b1874c995345e3eabd89cb1a05fbdf.tar.bz2 |
[gdb/build] Fix static cast of virtual base
With this change in bfd/development.sh:
...
-development=true
+development=false
...
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 \
‘T gdb::checked_static_cast(V*) [with T = tui_cmd_window*; V = tui_win_info]’:
tui-command.c:65:15: required from here
gdb-checked-static-cast.h:63:14: error: cannot convert from pointer to base \
class ‘tui_win_info’ to pointer to derived class ‘tui_cmd_window’ because \
the base is virtual
T result = static_cast<T> (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 <spam_hole@shaw.ca>
Reported-By: Simon Marchi <simark@simark.ca>
Approved-By: Tom Tromey <tom@tromey.com>
PR build/31399
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31399
Diffstat (limited to 'gdb/s390-tdep.c')
0 files changed, 0 insertions, 0 deletions