On Fri, 31 Mar 2023 13:00:08 GMT, Erik Joelsson <er...@openjdk.org> wrote:
>> Builds successfully with GCC 7 >> >> >> gcc (GCC) 7.3.1 20180712 (Red Hat 7.3.1-15) >> Copyright (C) 2017 Free Software Foundation, Inc. >> This is free software; see the source for copying conditions. There is NO >> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > >> > The build system doesn't have a convenient way of selectively disable >> > warnings for different compiler versions. I recommend against trying to >> > implement that here. >> > If this library is all third-party code, does it really matter that much >> > if we disable another warning? We aren't responsible for keeping this >> > source warning free as we can't make changes to it to anyway. >> >> Isnt it is possible to check the TOOLCHAIN_TYPE+TOOLCHAIN_VERSION as we did >> here?: >> [3476724](https://github.com/openjdk/jdk/commit/347672464127a5d4dd847ba2a4ca30c5ff51b32c) >> Or we do not set such props for gcc? > > As I said, it's possible, but inconvenient, and IMO not worth it for just > disabling a warning. The linked example changes an optimization flag to avoid > a compiler bug. That seems like a severe enough consequence to warrant such > construct in the build. We want to avoid having a large amount of compiler > version checks in the makefiles. In make we can only easily compare versions > for equality and not ranges. > > That said, it may be worth adding a comment that this warning has only been > observed with GCC 7. That will help in the future when someone tries to > remove disabled warnings. Added a comment as suggested by @erikj79 I incorrectly used the `/summary` command. Turns out the bot is smart enough to update from the updated JBS isssue, and the summary command does not do what I thought. Let me try to fix it. ------------- PR Comment: https://git.openjdk.org/jdk/pull/13253#issuecomment-1492621972