On Wed, 5 May 2021 11:05:11 GMT, Jan Lahoda <jlah...@openjdk.org> wrote:
>> src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassWriter.java line >> 1704: >> >>> 1702: if (Feature.REDUNDANT_STRICTFP.allowedInSource(source)) >>> 1703: result = result & ~STRICTFP; >>> 1704: >> >> Nitpick: Doing in Rome as ... would mean this is better written as >> >> result &= ~STRICTFP; >> >> to be in harmony with the code in the vicinity >> >> Also I am OK with the feature-allowed-in-source-check, but wonder if it is >> an overkill for smaller focussed changes like this one. I will say I don't >> know what is the standard operating procedure. See that elsewhere in >> Lint.java you are doing >> >> if (source.compareTo(Source.JDK17) >= 0) { >> values.add(LintCategory.STRICTFP); >> } > > IMO it is better to have an enum constant in Feature for source level changes. > > But here, I wonder if a Target method on this place wouldn't be more > appropriate. One can write: > > javac -source 16 -targete 17 Test.java > > > If `Test.java` contains `strictfp`, should the classfile have `STRICTFP` set > or not? Suggestions taken. ------------- PR: https://git.openjdk.java.net/jdk/pull/3831