From 570dc176ff0e33525c4c1db981de87aa0dce742e Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Wed, 22 Oct 2014 06:08:20 +0100 Subject: Do not increment of decrement enums MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In C++, we can't do arithmetic on enums. This patch fixes build errors like: src/gdb/i386-tdep.c: In function ‘int i386_stap_parse_special_token(gdbarch*, stap_parse_info*)’: src/gdb/i386-tdep.c:4309:7: error: no match for ‘operator++’ (operand type is ‘i386_stap_parse_special_token(gdbarch*, stap_parse_info*)::’) ++current_state; ^ ... src/gdb/rs6000-tdep.c:4265:18: error: no match for ‘operator++’ (operand type is ‘powerpc_vector_abi’) src/gdb/arm-tdep.c:9428:71: error: no match for ‘operator++’ (operand type is ‘arm_float_model’) src/gdb/arm-tdep.c:9465:64: error: no match for ‘operator++’ (operand type is ‘arm_abi_kind’) ... gdb/ChangeLog: 2015-02-27 Tom Tromey Pedro Alves * arm-tdep.c (set_fp_model_sfunc, arm_set_abi): Use 'int' for local used to iterate over enums. * completer.c (signal_completer): Likewise. * i386-tdep.c (i386_stap_parse_special_token): Likewise. * rs6000-tdep.c (powerpc_set_vector_abi): Likewise. * tui/tui-data.c (tui_next_win, tui_prev_win): Likewise. * tui/tui-layout.c (next_layout, prev_layout): Likewise. * tui/tui-win.c (tui_refresh_all_win, tui_rehighlight_all) (tui_resize_all, tui_set_focus_command, tui_all_windows_info): Likewise. * tui-wingeneral.c (tui_refresh_all): Likewise. --- gdb/tui/tui-wingeneral.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gdb/tui/tui-wingeneral.c') diff --git a/gdb/tui/tui-wingeneral.c b/gdb/tui/tui-wingeneral.c index 72d8cd9b547..b95da4963a5 100644 --- a/gdb/tui/tui-wingeneral.c +++ b/gdb/tui/tui-wingeneral.c @@ -252,7 +252,7 @@ tui_make_all_invisible (void) void tui_refresh_all (struct tui_win_info **list) { - enum tui_win_type type; + int type; struct tui_gen_win_info *locator = tui_locator_win_info_ptr (); for (type = SRC_WIN; (type < MAX_MAJOR_WINDOWS); type++) -- cgit v1.2.1