Skip to content

Conversation

Daft-Freak
Copy link
Collaborator

This has been here ~forever because of "serious performance implications", but ends up causing a bunch of other issues. Like making it really annoying to print a float:

error: implicit conversion from 'float' to 'double' when passing argument to function [-Werror=double-promotion]
   32 |     snprintf(buf, sizeof(buf), "Accel\nX: %f\nY: %f\nZ: %f", accel_val.x, accel_val.y, accel_val.z);
      |                                                              ~~~~~~~~~~^

Also, I'm not sure how much -fsingle-precision-constant helps considering that it makes the behaviour different depending on what you're building for...

auto d = 1.0; // sometimes a float, sometimes a double!

@Gadgetoid
Copy link
Contributor

I only have the very deepest darkest recollection of these!

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.

2 participants