From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 818D53858D33 for ; Wed, 8 Mar 2023 20:22:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 818D53858D33 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark.ca Received: from [172.16.0.192] (192-222-143-198.qc.cable.ebox.net [192.222.143.198]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id D8C1D1E110; Wed, 8 Mar 2023 15:22:50 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1678306971; bh=Yf7xGQJEsDl4RHtdv+YKbcAVS6BArrMuAigge6vNKgA=; h=Date:Subject:To:References:From:In-Reply-To:From; b=neqx2j3xxSu3EdT/mLtwzCHNbhv1XhZs6Vmj4n/y6Oe3o63QM5uHGvYYmKAIRVoK1 32qd0dpR1UqMDL31t5VavBuYhwFLAK054iLVkK/ZtNXL8R5LoyH2VtF9Jq256C2Rp2 ku0Vr5bdbyYCRLI+dbnxlncxtZiZQPAPQldpaPQk= Message-ID: Date: Wed, 8 Mar 2023 15:22:50 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: GDB 13.1 and clang Content-Language: fr To: Chris Johns , gdb@sourceware.org References: From: Simon Marchi In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 3/8/23 15:07, Chris Johns wrote: > Hi, > > I have just tried to build the latest RTEMS tools and we now use gdb 13.1. I am > seeing a build failure on FreeBSD 13.1 of: > > In file included from ../../gdb-13.1/gdb/xml-tdesc.c:23: > In file included from ../../gdb-13.1/gdb/target.h:42: > In file included from ../../gdb-13.1/gdb/infrun.h:21: > In file included from ../../gdb-13.1/gdb/gdbthread.h:26: > In file included from ../../gdb-13.1/gdb/breakpoint.h:38: > ../../gdb-13.1/gdb/target/waitstatus.h:113:1: error: use of undeclared > identifier 'DIAGNOSTIC_ERROR_SWITCH' > DIAGNOSTIC_ERROR_SWITCH > ^ > > I only have clang installed on the FreeBSD machine. > > A quick review of include/diagnostics.h seems to show support for > DIAGNOSTIC_ERROR_SWITCH only in the gcc area? Hmm, I see it in the clang section: # define DIAGNOSTIC_ERROR_SWITCH \ DIAGNOSTIC_ERROR ("-Wswitch") https://sourceware.org/cgit/binutils-gdb/tree/include/diagnostics.h?h=gdb-13.1-release&id=4f3e26ac6ee31f7bc4b04abd8bdb944e7f1fc5d2#n76 Unless there's a typo I don't see. diagnostics.h is included at the top of waitstatus.h. Is it possible that another unrelated diagnostics.h gets included on FreeBSD? You could inspect the preprocessed file to see what the preprocessor included for diagnostics.h. Simon