From: Simon Marchi <simark@simark.ca>
To: Chris Johns <chrisj@rtems.org>, gdb@sourceware.org
Subject: Re: GDB 13.1 and clang
Date: Wed, 8 Mar 2023 15:22:50 -0500 [thread overview]
Message-ID: <edae6cb1-800d-a855-28f4-a0d80eb6bbb6@simark.ca> (raw)
In-Reply-To: <e8ef3389-458d-7c5a-e5df-650f7af8fef2@rtems.org>
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
next prev parent reply other threads:[~2023-03-08 20:22 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-08 20:07 Chris Johns
2023-03-08 20:16 ` Andrew Pinski
2023-03-08 20:22 ` Simon Marchi [this message]
2023-03-08 21:22 ` Chris Johns
2023-03-08 21:36 ` Simon Marchi
2023-03-08 21:41 ` Chris Johns
2023-03-08 22:07 ` Joel Sherrill
2023-03-09 7:07 ` Eli Zaretskii
2023-03-08 22:53 ` John Baldwin
2023-03-09 2:15 ` Simon Marchi
2023-03-09 3:20 ` Chris Johns
2023-03-09 2:41 ` Chris Johns
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=edae6cb1-800d-a855-28f4-a0d80eb6bbb6@simark.ca \
--to=simark@simark.ca \
--cc=chrisj@rtems.org \
--cc=gdb@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).