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: Florian Weimer <fweimer at redhat dot com>
- To: Rich Felker <dalias at libc dot org>, "Carlos O'Donell" <carlos at redhat dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>, Andreas Schwab <schwab at linux-m68k dot org>
- Date: Thu, 02 Apr 2015 00:49:10 +0200
- Subject: Re: [PATCH] Use 1U everywhere in elf/elf.h.
- Authentication-results: sourceware.org; auth=none
- References: <54F9E0CE dot 8070303 at redhat dot com> <20150306182156 dot GQ23507 at brightrain dot aerifal dot cx>
On 03/06/2015 07:21 PM, Rich Felker wrote:
> On Fri, Mar 06, 2015 at 12:15:58PM -0500, 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.
>>
>> No regressions on x86_64.
>>
>> OK to commit?
>
> Being that the type of all these constants is changed from a signed
> type to an unsigned type, there is a risk of regressions if they're
> used in comparisons anywhere.
This could also trigger format warnings (and build failures with
-Werror), and change C++ overload resolution.
> I don't claim any such uses exist, but
> it's a risk that should probably be explored. If no problems are found
> then I prefer your solution of fixing them all.
Yes, but I think this means that this change needs a NEWS entry and a bug.
--
Florian Weimer / Red Hat Product Security