On 2016-08-25 23:28, Kim Barrett wrote:
On Aug 24, 2016, at 5:48 AM, Erik Joelsson <erik.joels...@oracle.com> wrote:
Hello,
On 2016-08-23 18:12, Phil Race wrote:
On 08/23/2016 08:47 AM, Erik Joelsson wrote:
Hello,
I do agree that maintaining the list of disabled warnings will be
impossible unless we have a structured way of tracking for which
compiler versions we disable what. Ideally we should be able to easily
add conditions for when certain warnings should be disabled. We are
unfortunately lacking that today and at least I don't have the
bandwidth to fix that anytime soon.
The official compilers are only really official for Oracle. The
OpenJDK can (and should) be buildable with a much wider range of
compiler versions.
I agree there. This is fortunately not an "unbuildable" situation.
The only other option I can think of which may or may not be palatable
is to explicitly
check the compiler version and add that disabled warning only for that
exact compiler version.
There'd still be some maintenance as that compiler version became either
official .. or obsolete ..
Is there precedent (or any kind of support) for that ?
What I had in mind was a structured way of adding conditionals for some kind of ranges of
compiler versions, or at least something like 6.*, or "greater than 4.9.3".
It's pretty simple today to check for exact compiler versions but then we end up with a
lot of changes when minor versions are bumped. I don't think that would be worth it.
In this particular case is shift-negative-value a new warning in GCC 6? If
that's the case it doesn't actually hurt adding it since GCC is nice enough to
not complain about unknown warning tags.
Not reviewing, but this caught my eye.
The feature of not complaining about unknown -Wno-xxx warning options is only
since gcc4.4.
Some folks (like SAP) are still using versions that are older than that.
That is true, so configure checks if gcc complains about unknown
warnings. If not, we automatically do not add the -Wno-* arguments.
/Erik
If we do, just make sure to specify in a comment that it's specific to GCC
version 6+.