note: the ABI of passing union with ‘long double’ has changed in GCC 4.4
Jonathan Grant
jgrantonline@gmail.com
Mon Sep 14 09:29:55 GMT 2026
Hello
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.
Example:
https://godbolt.org/z/8saefr1a4
<source>: In function 'void f(my_t)':
<source>:9:6: note: the ABI of passing union with 'long double' has changed in GCC 4.4
9 | void f(my_t my)
| ^
Compiler returned: 0
typedef struct
{
union {
bool b;
long double long_d;
} data;
} my_t;
void f(my_t my)
{
__builtin_printf("%d", my.data.b);
}
I'm not on this list, may I ask to include my email in replies.
Kind regards
Jonathan
More information about the Gcc
mailing list