Skip to content

deprecate scala.annotation.strictfp - #24839

Merged
SolalPirelli merged 2 commits into
scala:mainfrom
xuwei-k:deprecate-strictfp
May 27, 2026
Merged

SolalPirelli merged 2 commits into
scala:mainfrom
xuwei-k:deprecate-strictfp

Conversation

@xuwei-k

@xuwei-k xuwei-k commented Dec 27, 2025

Copy link
Copy Markdown
Contributor

https://openjdk.org/jeps/306

$ cat A.java
public class A {
  strictfp double foo() {
    return 1.2;
  }
}
$ java --version
openjdk 17.0.17 2025-10-21 LTS
OpenJDK Runtime Environment Corretto-17.0.17.10.1 (build 17.0.17+10-LTS)
OpenJDK 64-Bit Server VM Corretto-17.0.17.10.1 (build 17.0.17+10-LTS, mixed mode, sharing)
$ javac A.java
A.java:2: warning: [strictfp] as of release 17, all floating-point expressions are evaluated strictly and 'strictfp' is not required
  strictfp double foo() {
                  ^
1 warning

@xuwei-k
xuwei-k marked this pull request as ready for review December 27, 2025 08:39
@xuwei-k
xuwei-k requested a review from a team as a code owner December 27, 2025 08:39
@hamzaremmal hamzaremmal added this to the 3.10.0 milestone Dec 27, 2025
@hamzaremmal hamzaremmal added the needs-minor-release This PR cannot be merged until the next minor release label Dec 27, 2025

@hamzaremmal hamzaremmal left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Note that the backend already doesn't support it.

xuwei-k and others added 2 commits May 27, 2026 09:14
https://openjdk.org/jeps/306

```
$ cat A.java
public class A {
  strictfp double foo() {
    return 1.2;
  }
}
$ java --version
openjdk 17.0.17 2025-10-21 LTS
OpenJDK Runtime Environment Corretto-17.0.17.10.1 (build 17.0.17+10-LTS)
OpenJDK 64-Bit Server VM Corretto-17.0.17.10.1 (build 17.0.17+10-LTS, mixed mode, sharing)
$ javac A.java
A.java:2: warning: [strictfp] as of release 17, all floating-point expressions are evaluated strictly and 'strictfp' is not required
  strictfp double foo() {
                  ^
1 warning
```
Co-authored-by: Hamza Remmal <hamza@remmal.net>
@SolalPirelli
SolalPirelli enabled auto-merge (squash) May 27, 2026 08:19
@SolalPirelli
SolalPirelli merged commit 3457bc3 into scala:main May 27, 2026
45 checks passed
bishabosha pushed a commit to dotty-staging/dotty that referenced this pull request Jun 5, 2026
https://openjdk.org/jeps/306

```
$ cat A.java
public class A {
  strictfp double foo() {
    return 1.2;
  }
}
$ java --version
openjdk 17.0.17 2025-10-21 LTS
OpenJDK Runtime Environment Corretto-17.0.17.10.1 (build 17.0.17+10-LTS)
OpenJDK 64-Bit Server VM Corretto-17.0.17.10.1 (build 17.0.17+10-LTS, mixed mode, sharing)
$ javac A.java
A.java:2: warning: [strictfp] as of release 17, all floating-point expressions are evaluated strictly and 'strictfp' is not required
  strictfp double foo() {
                  ^
1 warning
```

---------

Co-authored-by: Hamza Remmal <hamza@remmal.net>
@xuwei-k
xuwei-k deleted the deprecate-strictfp branch September 3, 2026 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-minor-release This PR cannot be merged until the next minor release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants