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

Double Promotion Warning #1504

Closed
jwillikers opened this issue Jan 2, 2020 · 2 comments
Closed

Double Promotion Warning #1504

jwillikers opened this issue Jan 2, 2020 · 2 comments

Comments

@jwillikers
Copy link
Contributor

I have a double promotion warning from Clang 9.0. Looks like a simple static_cast<double>(value) should fix it.

fmt/format.h:1194:51: error: implicit conversion increases floating-point precision: 'float' to 'double' [-Werror,-Wdouble-promotion]
inline double promote_float(float value) { return value; }
@jwillikers jwillikers changed the title Implicit Conversion Double Promotion Warning Jan 2, 2020
@vitaut
Copy link
Contributor

vitaut commented Jan 3, 2020

Suppressed the warning with a static_cast in b3fd000.

@vitaut vitaut closed this as completed Jan 3, 2020
@jwillikers
Copy link
Contributor Author

@vitaut Many thanks!

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

2 participants