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: [commit] Do not rely on FIELD_LOC_KIND_BITPOS being zero


> >> We could make the compiler catch these by making the macro return
> >> an rvalue.
[...]
> 2012-04-17  Pedro Alves  <palves@redhat.com>
> 
> 	* gdbtypes.h (FIELD_BITPOS): Rename to ...
> 	(FIELD_BITPOS_LVAL): ... this.
> 	(FIELD_BITPOS): New.
> 	(SET_FIELD_BITPOS): Adjust to use FIELD_BITPOS_LVAL.
> 	* dwarf2read.c (dwarf2_add_field): Use SET_FIELD_BITPOS.
> 	* gdbtypes.c (append_composite_type_field_aligned): Adjust to use
> 	SET_FIELD_BITPOS.
> 	* gnu-v3-abi.c (build_gdb_vtable_type): Adjust to use
> 	SET_FIELD_BITPOS.
> 	* stabsread.c (read_cpp_abbrev, read_one_struct_field)
> 	(read_baseclasses): Adjust to use SET_FIELD_BITPOS.
> 	* target-descriptions.c (tdesc_gdb_type): Adjust to use
> 	SET_FIELD_BITPOS.

Thanks for doing that, Pedro - I was going to suggest the same thing.
The more the compiler catches errors for us, the better!

-- 
Joel


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