MONDAY, OCTOBER 19, 2026
include/diagnostics.h — Proposed
include/diagnostics.h: add DIAGNOSTIC_IGNORE_PARENTHESES
Adds a macro to easily ignore '-Wparentheses' compiler warnings in binutils headers.
This patch introduces the DIAGNOSTIC_IGNORE_PARENTHESES macro in include/diagnostics.h. This macro simplifies the process of conditionally disabling the -Wparentheses compiler warning, which is used in subsequent patches to address warnings generated by new compiler versions.
In Details
This change adds a convenience macro to binutils' diagnostic header. The macro DIAGNOSTIC_IGNORE_PARENTHESES wraps the compiler-specific directives to ignore the -Wparentheses warning, making it easier for other patches in the series to conditionally suppress this warning without repeating the macro invocation logic.
For Context
- DIAGNOSTIC_IGNORE
- A macro in binutils that conditionally defines another macro to ignore specific compiler warnings, usually by passing warning flags to the compiler.
- -Wparentheses
- A compiler warning flag that typically indicates potentially ambiguous or unnecessary parentheses in expressions, which could lead to subtle bugs.