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] Fix uninitialized Dwarf_Frame->regs


> Do you mean plain assert?  I would find this case more appropriate for static
> assertion, in GDB it is:

I did, but only because I didn't think we had a handy macro for static assert.

> In elfutils is already BUILD_BUG_ON_ZERO but only in "libebl/libeblP.h".

Move it into lib/system.h.  For this kind of use, we should have one that
is warning-free when used as a statement, so add another macro if needed to
achieve that.  That's better than a hack like:

> +	      bigger += BUILD_BUG_ON_ZERO (reg_unspecified);


Thanks,
Roland

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