This is the mail archive of the gcc@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]

Re: [LLVMdev] FYI: IA-32 psABI draft version 0.1


On Thu, Jan 22, 2015 at 4:35 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
> Here is the link:
>
> https://groups.google.com/forum/#!topic/ia32-abi/nq6cvH_VVV4

The document contains this claim (as do many other psABI documents):

"Bit-fields that are neither signed nor unsigned
always have non-negative values. Although they may have type char,
short, int, or long (which can have negative values), these bit-fields
have the same range as a bit-field of the same size with the
corresponding unsigned type."

This does not reflect the ABI as widely implemented, and is
incompatible with C++ (in which plain bit-fields are required to be
signed).

GCC documents why they ignore the psABI in this regard here:
https://gcc.gnu.org/onlinedocs/gcc/Non-bugs.html#Non-bugs

I would suggest either removing this specification from the psABI or
correcting it to reflect actual implementation practice: plain
bit-fields are signed.


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