Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JDK-8253239: Disable VS warning C4307 #237

Closed
wants to merge 2 commits into from

Conversation

MBaesken
Copy link
Member

@MBaesken MBaesken commented Sep 18, 2020

hello, this fixes the build when using VS2017. VS2019 does not have the issue as far as I know.
failure was

./test/hotspot/gtest/utilities/test_align.cpp(96): error C2220: warning treated as error - no 'object' file generated
./test/hotspot/gtest/utilities/test_align.cpp(156): note: see reference to function template instantiation 'void static_test_alignments<T,A>(void)' being compiled
with
[
T=int64_t,
A=uint8_t
]
./test/hotspot/gtest/utilities/test_align.cpp(162): note: see reference to function template instantiation 'void test_alignments<int64_t,uint8_t>(void)' being compiled
./test/hotspot/gtest/utilities/test_align.cpp(96): warning C4307: '+': integral constant overflow

This might be related to an issue fixed at least in some versions of VS2019 , that is discussed here :

https://developercommunity.visualstudio.com/content/problem/211134/unsigned-integer-overflows-in-constexpr-functionsa.html

https://bugs.openjdk.java.net/browse/JDK-8253239


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

Reviewers

Download

$ git fetch https://git.openjdk.java.net/jdk pull/237/head:pull/237
$ git checkout pull/237

@bridgekeeper
Copy link

bridgekeeper bot commented Sep 18, 2020

👋 Welcome back mbaesken! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot added the rfr Pull request is ready for review label Sep 18, 2020
@openjdk
Copy link

openjdk bot commented Sep 18, 2020

@MBaesken The following label will be automatically applied to this pull request: build.

When this pull request is ready to be reviewed, an RFR email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label (add|remove) "label" command.

@openjdk openjdk bot added the build build-dev@openjdk.org label Sep 18, 2020
@mlbridge
Copy link

mlbridge bot commented Sep 18, 2020

Webrevs

@@ -134,6 +134,9 @@ AC_DEFUN([FLAGS_SETUP_WARNINGS],

WARNINGS_ENABLE_ALL="-W3"
DISABLED_WARNINGS="4800"
if test "x$TOOLCHAIN_VERSION" = x2017; then
DISABLED_WARNINGS+=" 4307"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like this file uses 2 spaces as indenting, 4 spaces are used here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You Are right, I adjusted the indenting to 2 sapces and did a git commit --amend and repushed it.

Copy link
Member

@shipilev shipilev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks fine to me, but build maintainers should approve.

@@ -134,6 +134,9 @@ AC_DEFUN([FLAGS_SETUP_WARNINGS],

WARNINGS_ENABLE_ALL="-W3"
DISABLED_WARNINGS="4800"
if test "x$TOOLCHAIN_VERSION" = x2017; then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like a comment here explaining why we need to disable this warning, since it's caused by a faulty behavior in the compiler.

make/autoconf/flags-cflags.m4 Show resolved Hide resolved
@erikj79
Copy link
Member

erikj79 commented Sep 18, 2020

I left a suggestion for a comment. You should be able to just accept it if you are happy with it. If you would rather write something yourself, I recommend committing without --amend. The Skara bot will automatically squash all your changes before merging this to the main repo.

Co-authored-by: Erik Joelsson <37597443+erikj79@users.noreply.github.com>
@openjdk
Copy link

openjdk bot commented Sep 18, 2020

@MBaesken This change now passes all automated pre-integration checks. In addition to the automated checks, the change must also fulfill all project specific requirements

After integration, the commit message will be:

8253239: Disable VS warning C4307

Reviewed-by: mdoerr, erikj
  • If you would like to add a summary, use the /summary command.
  • To credit additional contributors, use the /contributor command.
  • To add additional solved issues, use the /issue command.

Since the source branch of this PR was last updated there have been 6 commits pushed to the master branch:

  • 05572e8: 8253350: Remove unimplemented SharedRuntime::clean_*_entry
  • 43019a0: 8253345: Remove unimplemented Arguments::lookup_logging_aliases
  • 6e9efff: 8253344: Remove unimplemented Arguments::check_gc_consistency
  • 83b2411: 8253342: Fix typos in String.transform
  • 86a1640: 8244505: G1 pause time ratio calculation does not consider Remark/Cleanup pauses
  • 11c4ea9: 8253278: Refactor/cleanup oopDesc::*_klass_addr

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid automatic rebasing, please merge master into your branch, and then specify the current head hash when integrating, like this: /integrate 05572e86514771819ec9392f79bdd3b5bfa79940.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Sep 18, 2020
@MBaesken
Copy link
Member Author

/integrate

@openjdk openjdk bot closed this Sep 18, 2020
@openjdk openjdk bot added integrated Pull request has been integrated and removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Sep 18, 2020
@openjdk
Copy link

openjdk bot commented Sep 18, 2020

@MBaesken Since your change was applied there have been 6 commits pushed to the master branch:

  • 05572e8: 8253350: Remove unimplemented SharedRuntime::clean_*_entry
  • 43019a0: 8253345: Remove unimplemented Arguments::lookup_logging_aliases
  • 6e9efff: 8253344: Remove unimplemented Arguments::check_gc_consistency
  • 83b2411: 8253342: Fix typos in String.transform
  • 86a1640: 8244505: G1 pause time ratio calculation does not consider Remark/Cleanup pauses
  • 11c4ea9: 8253278: Refactor/cleanup oopDesc::*_klass_addr

Your commit was automatically rebased without conflicts.

Pushed as commit 52c28b8.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@MBaesken MBaesken deleted the JDK-8253239 branch November 17, 2020 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build build-dev@openjdk.org integrated Pull request has been integrated
4 participants