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

i386: Ignore internal GCC classes when diagnosing ABI changes

GCC now correctly ignores internal GCC-specific type classes when diagnosing x86-64 ABI changes, preventing spurious warnings.

This commit improves the accuracy of x86-64 ABI change diagnostics by ignoring GCC’s internal partial type classes. Classes like X86_64_INTEGERSI_CLASS are refinements not recognized by the psABI, which only considers broader categories like INTEGER or SSE. Previously, differences in these internal classes could trigger unnecessary ABI change warnings, such as those related to zero-width bit-fields. The fix ensures that comparisons for ABI changes only use the psABI-defined classes, preventing these false positives.

In Details

The psabi_full_class function is introduced in config/i386/i386.cc to map GCC's internal, more granular type classes (e.g., X86_64_INTEGERSI_CLASS) to the coarser classes defined by the x86-64 psABI (e.g., INTEGER). The classify_argument wrapper now uses this function to compare argument classes, ensuring that differences solely based on GCC's internal refinements do not trigger ABI change warnings. This addresses issues like PR102024 where zero-width bit-fields caused spurious notes.

For Context
psABI
Processor-specific Application Binary Interface. For x86-64, this typically refers to the System V ABI.
ABI change diagnostics
Compiler features that warn the user when changes to data types or function signatures might affect the program's binary interface, potentially breaking compatibility.
zero-width bit-field
A bit-field declared with zero width, which can affect structure layout and member access in C/C++.
x86-64 psABI classes
Categories defined by the x86-64 System V ABI for classifying how function arguments are passed in registers (e.g., INTEGER, SSE, SSEUP, X87UP, COMPLEX_X87, NO_CLASS, MEMORY).
Filed Under: abix86-64compilerwarning