This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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: RFA: unbreak typedefed bitfield


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.

- Volodya


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