From: Nick Clifton <nickc@redhat.com>
To: Jan-Benedict Glaw <jbglaw@lug-owl.de>,
binutils@sourceware.org, gdb-patches@sourceware.org
Subject: Re: [PATCH] diagnostics.h: GCC 13 got -Wself-move, breaks GDB build
Date: Mon, 3 Oct 2022 14:49:55 +0100 [thread overview]
Message-ID: <670fd724-f14f-565f-b4a1-5883a8a1b5ab@redhat.com> (raw)
In-Reply-To: <20221002185433.gl7dvytfh5wthifx@lug-owl.de>
Hi Jan-Benedict,
> +# if __GNUC__ >= 13
> +# define DIAGNOSTIC_IGNORE_SELF_MOVE DIAGNOSTIC_IGNORE ("-Wself-move")
> +# endif
There appears to be a convention that the definition should be broken
up over two lines, ie:
# if __GNUC__ >= 13
# define DIAGNOSTIC_IGNORE_SELF_MOVE \
DIAGNOSTIC_IGNORE ("-Wself-move")
# endif
Although DIAGNOSTIC_ERROR_SWITCH appears to be the exception to this rule.
More importantly however, you need to provide an empty definition at the
end of the file should the macro not be defined. ie:
#ifndef DIAGNOSTIC_IGNORE_SELF_MOVE
# define DIAGNOSTIC_IGNORE_SELF_MOVE
#endif
Cheers
Nick
next prev parent reply other threads:[~2022-10-03 13:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-02 18:54 Jan-Benedict Glaw
2022-10-03 13:49 ` Nick Clifton [this message]
2022-10-03 14:24 ` Jan-Benedict Glaw
2022-10-03 14:36 ` Nick Clifton
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=670fd724-f14f-565f-b4a1-5883a8a1b5ab@redhat.com \
--to=nickc@redhat.com \
--cc=binutils@sourceware.org \
--cc=gdb-patches@sourceware.org \
--cc=jbglaw@lug-owl.de \
/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).