[PATCH 3/6] include/diagnostics.h: add DIAGNOSTIC_IGNORE_PARENTHESES
Tom de Vries
tdevries@suse.de
Fri Nov 20 09:09:41 GMT 2026
On 10/19/26 6:58 PM, Simon Marchi wrote:
> This is used by a following patch.
>
Hi Simon,
LGTM.
Approved-By: Tom de Vries <tdevries@suse.de>
Thanks,
- Tom
> Change-Id: I38609e84b9b092170d2da5589fb243f4acd8a2b4
> Cc: binutils@sourceware.org
> ---
> include/diagnostics.h | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/include/diagnostics.h b/include/diagnostics.h
> index 364789d9af7d..8cae8ac7de86 100644
> --- a/include/diagnostics.h
> +++ b/include/diagnostics.h
> @@ -63,6 +63,8 @@
> # define DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL \
> DIAGNOSTIC_IGNORE ("-Wformat-nonliteral")
>
> +# define DIAGNOSTIC_IGNORE_PARENTHESES DIAGNOSTIC_IGNORE ("-Wparentheses")
> +
> # if __has_warning ("-Wuser-defined-warnings")
> # define DIAGNOSTIC_IGNORE_USER_DEFINED_WARNINGS \
> DIAGNOSTIC_IGNORE ("-Wuser-defined-warnings")
> @@ -96,6 +98,8 @@
> # define DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL \
> DIAGNOSTIC_IGNORE ("-Wformat-nonliteral")
>
> +# define DIAGNOSTIC_IGNORE_PARENTHESES DIAGNOSTIC_IGNORE ("-Wparentheses")
> +
> # if __GNUC__ >= 5
> # define DIAGNOSTIC_IGNORE_UNUSED_BUT_SET_VARIABLE \
> DIAGNOSTIC_IGNORE ("-Wunused-but-set-variable")
> @@ -142,6 +146,10 @@
> # define DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL
> #endif
>
> +#ifndef DIAGNOSTIC_IGNORE_PARENTHESES
> +# define DIAGNOSTIC_IGNORE_PARENTHESES
> +#endif
> +
> #ifndef DIAGNOSTIC_IGNORE_USER_DEFINED_WARNINGS
> # define DIAGNOSTIC_IGNORE_USER_DEFINED_WARNINGS
> #endif
More information about the Binutils
mailing list