[jdk8u-dev] Integrated: 8157758: JDK9 does not compile on Linux with GCC 6.1 because left-shifting a negative number has undefined behavior

Sergey Bylokhov serb at openjdk.org
Thu Jan 8 18:27:11 UTC 2026


On Mon, 25 Aug 2025 17:51:48 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:

> Hi all,
> 
> This pull request contains a backport of commit [4abb5e4a](https://github.com/openjdk/jdk/commit/4abb5e4aafe05871a07d510f002a38298fe4dbb2) from the [openjdk/jdk](https://git.openjdk.org/jdk) repository.
> 
> The commit being backported was authored by Alex Henrie on 23 Jun 2016 and was reviewed by Kim Barrett and Max Ockner.
> 
> Thanks!

This pull request has now been integrated.

Changeset: 5e3692f7
Author:    Sergey Bylokhov <serb at openjdk.org>
URL:       https://git.openjdk.org/jdk8u-dev/commit/5e3692f7818b8d31a764beec1f3164dc30046c71
Stats:     2 lines in 2 files changed: 0 ins; 0 del; 2 mod

8157758: JDK9 does not compile on Linux with GCC 6.1 because left-shifting a negative number has undefined behavior

Replace shifts of -1 with shifts of ~0u.

Backport-of: 4abb5e4aafe05871a07d510f002a38298fe4dbb2

-------------

PR: https://git.openjdk.org/jdk8u-dev/pull/682


More information about the jdk8u-dev mailing list