GCC Newspaper
NOVEMBER 30, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
i386

i386: Shared infrastructure for -Wpsabi ABI change notes.

Improved infrastructure for reporting ABI changes detected by -Wpsabi.

This commit refactors the mechanism for generating -Wpsabi warnings about ABI changes on i386. It introduces a reusable infrastructure, replacing the previous specific handling for zero-width bit-fields. The new system uses a classify_state structure to track applied ABI changes and re-classifies types based on old behaviors. This allows for more generalized reporting of ABI deviations whenever a type’s classification actually changes, making the warning mechanism more robust and extensible.

In Details

The infrastructure for reporting ABI changes detected by -Wpsabi in config/i386/i386.cc has been generalized. Previously, zero-width bit-fields were handled by a specific second classification pass. This commit replaces that with a classify_state struct and a psabi_new_behavior_p function. classify_argument now records pending ABI changes and calls psabi_new_behavior_p to selectively re-classify types against old behaviors. A new inform_psabi_change function is used to emit warnings only when the classification differs, making the system extensible to new ABI changes like the un…

For Context
-Wpsabi
A GCC warning option that flags potential deviations from the Procedure Call Standard Application Binary Interface (PSABI).
ABI
Application Binary Interface. Defines how low-level code, such as compiled functions and system calls, interact at the binary level.
zero-width bit-field
A bit-field declared with zero bits, which has specific, sometimes surprising, alignment and layout implications in C/C++ structs.
classify_argument
An internal GCC function that determines how function arguments should be passed (e.g., in registers or memory) based on their type and target ABI.
Filed Under: i386abibuild