This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils 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: [PATCH] backends: Check type DIE exists before calling dwarf_tag ().


On Wed, 2013-02-06 at 13:08 -0800, Roland McGrath wrote:
> Unconditional use of (older) GCC extensions in elfutils code is fine.

For those playing along at home, I had to admit I didn't know about the
Statement-Exprs extension:
http://gcc.gnu.org/onlinedocs/gcc/Statement-Exprs.html
It is awesome!

> #define DWARF_TAG_OR_RETURN(die) \
>   ({ Dwarf_Die *_die = (die); \
>      if (_die == NULL) return -1; \
>      dwarf_tag (_die); })

That is indeed way nicer. I used it instead.

Thanks,

Mark


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