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] Do without union of variable length arrays.


The attached new 0002*patch file has ChangeLog files and uses MAX to
replace union types. Please take a look again.
Thanks.


On Tue, Sep 8, 2015 at 2:15 PM, Roland McGrath <roland@hack.frob.com> wrote:

> That looks generally OK, though it lacks ChangeLog entries.
> But I think it's a bit weird to declare those union types for
> the sole purpose of using sizeof on them.  I think it would
> be cleaner to replace e.g. sizeof (phdr_u) with:
>
> #define PHDR_MAX_SIZE MAX (sizeof (Elf32_Phdr), sizeof (Elf64_Phdr))
>
The attached new 0002*patch file has ChangeLog files and uses MAX to replace union types. Please take a look again.
Thanks.


On Tue, Sep 8, 2015 at 2:15 PM, Roland McGrath <roland@hack.frob.com> wrote:
That looks generally OK, though it lacks ChangeLog entries.
But I think it's a bit weird to declare those union types for
the sole purpose of using sizeof on them.  I think it would
be cleaner to replace e.g. sizeof (phdr_u) with:

#define PHDR_MAX_SIZE MAX (sizeof (Elf32_Phdr), sizeof (Elf64_Phdr))

Attachment: 0002-Do-without-union-of-variable-length-arrays.patch
Description: Binary data


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