From 9117c7b452ef76304f4394a97c887d0c4af439f5 Mon Sep 17 00:00:00 2001 From: Tom de Vries Date: Tue, 28 Jun 2022 17:07:18 +0200 Subject: [gdb/build] Fix gdb build with -fsanitize=thread and gcc 7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When building gdb with system gcc 7.5.0, I run into: ... gdb/ia64-tdep.c: In function ‘int is_float_or_hfa_type_recurse(type*, type**)’: gdb/ia64-tdep.c:3362:1: error: control reaches end of non-void function \ [-Werror=return-type] ... This is due to PR gcc/81275 - "-fsanitize=thread produce incorrect -Wreturn-type warning", which has been fixed in gcc-8. Work around this by moving the default return outside the switch. Tested on x86_64-linux. --- gdb/ia64-tdep.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gdb') diff --git a/gdb/ia64-tdep.c b/gdb/ia64-tdep.c index 82456dc..b94225b 100644 --- a/gdb/ia64-tdep.c +++ b/gdb/ia64-tdep.c @@ -3356,9 +3356,10 @@ is_float_or_hfa_type_recurse (struct type *t, struct type **etp) } break; default: - return 0; break; } + + return 0; } /* Determine if the given type is one of the floating point types or -- cgit v1.1