mark@codesourcery.com mark@codesourcery.com
Thu Jun 3 08:08:00 GMT 1999

>>>>> "Jeffrey" == Jeffrey A Law <law@cygnus.com> writes:

    Jeffrey> This may not be in the spirit of GCC, but if we fail to
    Jeffrey> keep the signedness of bitfields the same as it has
    Jeffrey> already been on that platform for years we introduce a
    Jeffrey> stupid and totally avoidable change in the ABI.

That's a reasonable argument.  But there's clearly a tradeoff:

  o On the one hand, we will break the ABI on DG/UX.  Some programs
    that ran correctly on DG/UX will have to be modified, or have
    their Makefiles altered.

  o On the other hand, supposedly portable GNU CC programs (i.e., 
    programs adhering to documented aspects of GNU CC, with the
    expectation that they will be portable to other platforms 
    running GNU CC) will have to be modified, or have their
    Makefiles altered.
I'd still prefer to have GNU CC adhere to its own long-standing
documented behavior, but I'm not a DG/UX expert.

    Jeffrey> And the signedness of bitfields does matter from an ABI
    Jeffrey> standpoint, contrary to what the manual states.  I've
    Jeffrey> been nailed badly by it in the past.

It all depends on your definition of ABI, I think.  I agree that this
would be a not-insignificant change.

At the very least, we should not expose a generic way of doing this,
i.e., via DEFAULT_BITFIELDS_SIGNED unless we wish to change the
manual.  At the very very least there should be a big comment above
DEFAULT_BITFIELDS_SIGNED saying that changing the default is
considered wrong.  Doing otherwise will only encourage people doing
ports to pick the value that matches the vendor's compiler, and that
will break our documented behavior.

Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com

More information about the Gcc-patches mailing list