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

remove compilation warning in OTP26.1 #107

Merged
merged 1 commit into from
Sep 22, 2023

Commits on Sep 21, 2023

  1. remove compilation warning in OTP26.1

    In OTP-27, `+0.0` and `-0.0` will no longer be the exact number so they
    added a compilation warning in OTP-26.1 to warn when a float 0.0 is
    getting match without specifying the sign:
    
    ```
    rebar3 compile                                                                                                                                                                               0s
    ===> Verifying dependencies...
    ===> Analyzing applications...
    ===> Compiling recon
    src/recon_alloc.erl:706:7: Warning: matching on the float 0.0 will no longer also match -0.0 in OTP 27. If you specifically intend to match 0.0 alone, write +0.0 instead.
    src/recon_alloc.erl:706:11: Warning: matching on the float 0.0 will no longer also match -0.0 in OTP 27. If you specifically intend to match 0.0 alone, write +0.0 instead.
    ```
    
    Longer explanation about why are not the same [1]
    
    Pull request adding the warning [2]
    
    [1] https://erlangforums.com/t/in-erlang-otp-27-0-0-will-no-longer-be-exactly-equal-to-0-0/2586
    [2] erlang/otp#7521
    Gonzalo Bella Fernandez committed Sep 21, 2023
    Configuration menu
    Copy the full SHA
    c7c07ad View commit details
    Browse the repository at this point in the history