[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freedesktop-xorg
Subject:    Re: CRAY bitfield support in protocol headers: does anyone care?
From:       Barton C Massey <bart () cs ! pdx ! edu>
Date:       2007-03-01 7:52:02
Message-ID: 200703010752.l217q2n7006666 () adara ! cs ! pdx ! edu
[Download RAW message or body]

In message <45E609B3.8010705@us.ibm.com> you wrote:
> Juliusz Chroboczek wrote:
> >> It's not likely that people here don't complain about this here if
> >> noone here has access to such an architecture.
> > 
> > Methinks it's a complier issue, not an architecture issue.  You'd hope
> > that C compilers would have learnt to synthesise masks out of sub-word
> > struct fields by now.
> 
> The CRAY compilers were perfectly within the C spec.  The C spec says,
> for example, that "short" must be *at least* 16-bits.  Last time I
> checked, 64-bits was at least 16-bits.  It just happens that there's no
> way, and there doesn't have to be in C89, to specify exactly 16-bits or
> exactly 32-bits.  So, you have to resort to bit-field nonsense.

I think Juliusz's point, with which I heartily agree, is
that while de jure this is a legal C implementation, de
facto it's kind of obnoxious for portability.  Thus, you
would hope that any decent modern CRAY (why are we all
all-capsing Cray's name?) C compiler would have a "do the
portable thing" switch.

    Bart

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic