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: bitfields: types vs modes?


Ian Lance Taylor wrote:

>> 1. If the functionality will be allowed in gcc at all
>>
>> 2. What info the target needs to be provided to make the choices it wants
>>
>> 3. What, if any, common code can be shared between the CPUs
> 
> Since the ARM ABI apparently specifies something about volatile
> bitfields, I think we ought to implement that.

Yes, we should.  I am aware of real user demand for this feature as
well.  It's a competitive disadvantage for GCC not to have this feature.

> I continue to think that a sane programmer would use a different
> mechanism.  C/C++ provides mechanisms for working with memory mapped
> hardware.  Bitfields are not one of those mechanisms.

I think the ARM specification is pretty sensible, and would make a good
cross-platform approach.  Using bit-fields may not be portable at
present, but it would sure be nice if it was; it maps directly onto how
people think about memory-mapped peripherals.

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713


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