This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Another GLIBC build error with GCC6
- From: Andreas Schwab <schwab at suse dot de>
- To: Roland McGrath <roland at hack dot frob dot com>
- Cc: <sellcey at imgtec dot com>, Jeff Law <law at redhat dot com>, GNU C Library <libc-alpha at sourceware dot org>
- Date: Wed, 22 Jul 2015 09:13:49 +0200
- Subject: Re: Another GLIBC build error with GCC6
- Authentication-results: sourceware.org; auth=none
- References: <1437496279 dot 19674 dot 126 dot camel at ubuntu-sellcey> <1437507995 dot 19674 dot 136 dot camel at ubuntu-sellcey> <55AEA71B dot 2020405 at redhat dot com> <1437509796 dot 19674 dot 138 dot camel at ubuntu-sellcey> <55AEB7FF dot 1000405 at redhat dot com> <1437518197 dot 19674 dot 152 dot camel at ubuntu-sellcey> <20150721224637 dot 1E0102C3B32 at topped-with-meat dot com>
Roland McGrath <roland@hack.frob.com> writes:
> In this case, the left shift doesn't even lose any bits, because the high
> bit is already zero (and it's a constant, so the compiler knows that). In
> fact, that's the whole point of the thing: to sign-extend the 31-bit value
> to 32 bits. I don't think it should complain about 0x7fffffff << 1.
Only if you make 0x7fffffff unsigned.
Andreas.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."