From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id 89D163933157 for ; Tue, 28 Jun 2022 15:07:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 89D163933157 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 7076621F82 for ; Tue, 28 Jun 2022 15:07:58 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 5A12213ACA for ; Tue, 28 Jun 2022 15:07:58 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id fCXeE04Zu2IFbQAAMHmgww (envelope-from ) for ; Tue, 28 Jun 2022 15:07:58 +0000 Message-ID: <92572357-17e1-0755-b536-98a6425bf0b9@suse.de> Date: Tue, 28 Jun 2022 17:07:57 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: [commited][gdb/build] Fix gdb build with -fsanitize=thread and gcc 7 Content-Language: en-US From: Tom de Vries To: gdb-patches@sourceware.org References: <20220625090840.GA21429@delia.com> In-Reply-To: <20220625090840.GA21429@delia.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_NUMSUBJECT, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Jun 2022 15:08:04 -0000 On 6/25/22 11:08, Tom de Vries wrote: > Hi, > > 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. > > Any comments? > Committed. Thanks, - Tom > [gdb/build] Fix gdb build with -fsanitize=thread and gcc 7 > > --- > 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; > } > > /* Determine if the given type is one of the floating point types or