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] libdwfl: Fix wrong type to make gcc -fsanitize=undefined happy.


On Thu, 2015-04-23 at 10:05 -0700, Roland McGrath wrote:
> > Something like can be done without unions:
> > 
> > #define msgstr (*(char (*)[sizeof msgtable])&msgtable)
> > 
> > AFACT it's well-defined C and permits to perform bound checking.
> 
> That's less clean than a union.

I like the union solution more too. Please do push it.

Thanks,

Mark

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