Revisit ABI change note for union with long double
Question if GCC's ABI change note for union/long double is still relevant.
The author questions whether a compiler note, originally added to inform about an ABI change in GCC 4.4 concerning unions with long double, is still necessary given GCC’s current version (16). They provide a Godbolt link demonstrating the note’s appearance and ask if it can be removed to avoid requiring pragmas or -Wno-psabi flags. A related Bugzilla entry (118676) is also mentioned.
- proposer
Asks if the ABI change note for unions with `long double` is still relevant in modern GCC versions and can be removed.
“I know this was useful back when it was added, is it worth revisiting and considering if it could be left out now GCC is on version 16? To save adding -Wno-psabi, or using pragma around it.”
- contributor
Notes a related Bugzilla report concerning the same issue.
“Saw someone reported on bugzilla https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118676 Jonathan”
Technical Tradeoffs
- Maintaining backward compatibility and ABI stability versus cleaning up old diagnostic notes.
- The impact of removing a warning note on users who might still rely on the older ABI behavior or are unaware of the change.
In Details
This discussion concerns a diagnostic note emitted by GCC related to Application Binary Interface (ABI) stability. Specifically, it questions the continued relevance of a note pointing out an ABI change in GCC 4.4 for passing unions containing long double. The author suggests that with GCC now at version 16, this specific ABI behavior might be stable or less critical, and the note could potentially be removed to clean up diagnostics, possibly referencing Bugzilla #118676.
- ABI
- Application Binary Interface. Defines how compiled code interacts at the binary level, including function calling conventions, data type representation, and system call interfaces.
- union
- A composite data type in C and C++ that can hold one of several different types of values at any given time. Only one member of a union is active at a time.
- long double
- A floating-point data type that typically offers greater precision or range than
double. - GCC 4.4
- A specific release version of the GNU Compiler Collection, known for introducing an ABI change related to the discussed topic.
- pragma
- A compiler directive that provides additional information to the compiler, often used to control aspects like code generation, warnings, or optimization.
- -Wno-psabi
- A GCC compiler flag to suppress warnings related to the C++ ABI.