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

exp_sinh.hpp uses old-style casts #740

Closed
rnburn opened this issue Jan 14, 2022 · 9 comments
Closed

exp_sinh.hpp uses old-style casts #740

rnburn opened this issue Jan 14, 2022 · 9 comments

Comments

@rnburn
Copy link

rnburn commented Jan 14, 2022

boost quadrature errors with the message below when compiled with the flags -Werror,-Wold-style-cast

It's easy enough to work around but there shouldn't be any need to use old-style casts.

external/boost/boost/math/quadrature/exp_sinh.hpp:64:18: error: use of old-style cast [-Werror,-Wold-style-cast]
        if (a == (Real) 0)
                 ^      ~
@NAThompson
Copy link
Collaborator

Yup, I'll fix it.

@rnburn
Copy link
Author

rnburn commented Jan 14, 2022

Thanks!

Btw looking through the code, I see a few other places where it's doing old-style casts:
https://github.com/boostorg/math/blob/develop/include/boost/math/quadrature/detail/exp_sinh_detail.hpp#L225

@NAThompson
Copy link
Collaborator

I'll fix 'em all!

@NAThompson
Copy link
Collaborator

@rnburn : Should be fixed in 741. Once the CI cycles I'll merge; are you consuming the standalone? If so you can consume this independently of the rest of boost.

@rnburn
Copy link
Author

rnburn commented Jan 15, 2022

Great! Thanks for the the quick turnaround.

I was using it through https://github.com/nelhage/rules_boost, but I'm sure I'll be able to find a way to adopt the fix.

@NAThompson
Copy link
Collaborator

@rnburn : Fix is merged.

Leaving this issue open as I made the same mistake in sinh-sinh and tanh-sinh quadrature, so I'll close once I get those done.

@NAThompson
Copy link
Collaborator

@jzmaddock : Will I get you into merge hell if I make those diffs? I see you have a pretty large outstanding diff to these files.

@jzmaddock
Copy link
Collaborator

I've just merged one lot of develop changes, if you don't mind holding off until CI has cycled on #722 I'll merge all that to develop if it's clean now. If not clean, just go ahead and I'll merge and resolve the conflicts on the branch, the merge conflicts aren't that awful.

@NAThompson
Copy link
Collaborator

Just opened a PR which completely removes all old-style casts in all the double-exponential quadratures. Closing . . .

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

No branches or pull requests

3 participants