This is the mail archive of the
mailing list for the GCC project.
Re: bitfields: types vs modes?
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Ian Lance Taylor <iant at google dot com>
- Cc: DJ Delorie <dj at redhat dot com>, gcc at gcc dot gnu dot org
- Date: Wed, 20 May 2009 14:08:44 -0700
- Subject: Re: bitfields: types vs modes?
- References: <200903100433.n2A4XKNL011948@greed.delorie.com> <200904010511.n315Ba28010006@greed.delorie.com> <firstname.lastname@example.org> <49DA30F0.email@example.com> <200904062003.n36K3WHc001273@greed.delorie.com> <49DA689F.firstname.lastname@example.org> <200905201948.n4KJmv4N017890@greed.delorie.com> <email@example.com>
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.
(650) 331-3385 x713