This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]