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

fix use of uninitialized variable and removed wrong and unused constants #32

Merged
merged 3 commits into from
Sep 23, 2024

Conversation

camel-cdr
Copy link
Contributor

I don't think there is a good/clean way to define the SNAN/QNAN/PINF/NINF/NEGZERO constants of type sui64_fp64, because the code wants to initialize them using floats, but the tests define sui64_fp64 with int64_t.
That isn't portable, possible for unions.
Since the current value is wrong, and they aren't used, the easiest fix seems to be to remove them.

…BFP_EXT__

SNAN/QNAN/PINF/NINF/NEGZERO where intitialized from a double, but they
all have a union type of which the first element is an int64_t.
gcc warns about this, e.g. "overflow [...] changes value from '+SNaN' to '0'"
@luhenry luhenry merged commit 7276c0d into rivosinc:main Sep 23, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants