[Bug target/42324] [4.3/4.4/4.5 Regression] Gcc doesn't follow x86-64 psABI on _Bool

hjl dot tools at gmail dot com gcc-bugzilla@gcc.gnu.org
Mon Dec 7 19:41:00 GMT 2009



------- Comment #4 from hjl dot tools at gmail dot com  2009-12-07 19:41 -------
We have 3 options:

1. Keep the psABI ASIS and fix gcc. But zero out upper 32bits of 64bits for
_Bool on stack doesn't make any sense.
2. Remove that paragraph in the psABI and keep gcc ASIS. It will make _Bool
consistent independent of if it is used for function parameters. Both gcc
and icc always treat _Bool as char even if it is returned from a function.
It may break compatibilities among x86-64 compilers. But we have such
problems anyway for gcc 4.3 and 4.4.
3. Changes the psABI to zero out 1-31bits. When _Bool is returned from
function, upper 63bits will be zeroed out due to x86-64 architecture. But
on stack, we only need to zero out 1-31bits. Even if we do this, we still
can't treat _Bool as long long when returned from a function since it will
break with object files compiled with gcc 4.3/4.4.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42324



More information about the Gcc-bugs mailing list