This is the mail archive of the
mailing list for the elfutils project.
Re: [PATCH] libdwfl: Fix wrong type to make gcc -fsanitize=undefined happy.
- From: Mark Wielaard <mjw at redhat dot com>
- To: elfutils-devel at lists dot fedorahosted dot org
- Date: Tue, 28 Apr 2015 17:37:05 +0200
- Subject: 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.