From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============6285025341558022875==" MIME-Version: 1.0 From: Mark Wielaard To: elfutils-devel@lists.fedorahosted.org Subject: Re: [PATCH] libdwfl: Fix wrong type to make gcc -fsanitize=undefined happy. Date: Tue, 28 Apr 2015 17:37:05 +0200 Message-ID: <1430235425.1938.199.camel@bordewijk.wildebeest.org> In-Reply-To: 20150423170544.1B32F2C3AB9@topped-with-meat.com --===============6285025341558022875== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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 --===============6285025341558022875==--