This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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: Don't use bfd_get_* macro to set bfd fields


>>>>> "Alan" == Alan Modra <amodra@gmail.com> writes:

Alan> I've always thought it odd style to use a bfd_get macro on the left
Alan> hand side of an assignment.  I didn't think it worth bothering to
Alan> make a bfd_set variant for these as their use would be local to bfd.

One trick we use in gdb is to prevent these assignments by making the
macro expand to an rvalue.  An example from gdb:

#define MSYMBOL_SIZE(msymbol)		((msymbol)->size + 0)

Tom


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