This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Use 1U everywhere in elf/elf.h.
- From: Szabolcs Nagy <szabolcs dot nagy at arm dot com>
- To: Carlos O'Donell <carlos at redhat dot com>, GNU C Library <libc-alpha at sourceware dot org>, Andreas Schwab <schwab at linux-m68k dot org>
- Date: Fri, 06 Mar 2015 17:25:57 +0000
- Subject: Re: [PATCH] Use 1U everywhere in elf/elf.h.
- Authentication-results: sourceware.org; auth=none
- References: <54F9E0CE dot 8070303 at redhat dot com>
On 06/03/15 17:15, Carlos O'Donell wrote:
> All the bits should be unsigned int in elf/elf.h since
> otherwise you can get a warning for using SHF_EXCLUDE
> in certain situations.
>
> See:
> https://lists.fedorahosted.org/pipermail/elfutils-devel/2015-January/004576.html
>
> I just made them all use 1U for consistency.
i just want to note here that eg the kernel headers are full of 1<<31
and since it is a common mistake c++14 changed the rules and probably
c will follow:
http://www.open-std.org/jtc1/sc22/wg14/www/docs/dr_463.htm
until then 1U is the right fix