RFA: unbreak typedefed bitfield
Mon Dec 21 17:18:00 GMT 2009
On Monday 21 December 2009 20:15:00 Daniel Jacobowitz wrote:
> On Mon, Dec 21, 2009 at 10:08:38AM -0700, Tom Tromey wrote:
> > You could try:
> > #define TYPE_LENGTH(thistype) check_typedef (thistype)->length
> > While this is probably insufficient to fix the check_typedef problem in
> > general, it may help with the most common source of problems.
> TYPE_LENGTH (type) = DW_UNSND (attr);
> That's likely to cause some trouble.
IMO, this usage should just go, in preference to
type_set_length (type, DW_UNSND (attr));
In fact, I think TYPE_LENGTH itself should go -- there's no reason to use a macro
with all the nasty behaviours like above when inline functions would work just fine.
More information about the Gdb-patches