From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2205) id 5D1373930B0C; Tue, 28 Jun 2022 15:07:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5D1373930B0C Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Tom de Vries To: gdb-cvs@sourceware.org Subject: [binutils-gdb] [gdb/build] Fix gdb build with -fsanitize=thread and gcc 7 X-Act-Checkin: binutils-gdb X-Git-Author: Tom de Vries X-Git-Refname: refs/heads/master X-Git-Oldrev: 68e80d96a84282d547f3b3c1234c99009521630c X-Git-Newrev: 9117c7b452ef76304f4394a97c887d0c4af439f5 Message-Id: <20220628150721.5D1373930B0C@sourceware.org> Date: Tue, 28 Jun 2022 15:07:21 +0000 (GMT) X-BeenThere: gdb-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Jun 2022 15:07:21 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D9117c7b452ef= 76304f4394a97c887d0c4af439f5 commit 9117c7b452ef76304f4394a97c887d0c4af439f5 Author: Tom de Vries Date: Tue Jun 28 17:07:18 2022 +0200 [gdb/build] Fix gdb build with -fsanitize=3Dthread and gcc 7 =20 When building gdb with system gcc 7.5.0, I run into: ... gdb/ia64-tdep.c: In function =E2=80=98int is_float_or_hfa_type_recurse(= type*, type**)=E2=80=99: gdb/ia64-tdep.c:3362:1: error: control reaches end of non-void function= \ [-Werror=3Dreturn-type] ... =20 This is due to PR gcc/81275 - "-fsanitize=3Dthread produce incorrect -Wreturn-type warning", which has been fixed in gcc-8. =20 Work around this by moving the default return outside the switch. =20 Tested on x86_64-linux. Diff: --- gdb/ia64-tdep.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gdb/ia64-tdep.c b/gdb/ia64-tdep.c index 82456dc9c98..b94225b5e13 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; } =20 /* Determine if the given type is one of the floating point types or