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

Update make_const.go floating point format verb #388

Closed
wants to merge 1 commit into from

Conversation

dmgard
Copy link

@dmgard dmgard commented Apr 18, 2023

Change floating point format verb to %#f from %#v to ensure floating point constants are always printed with a decimal, ensuring they will be correctly interpreted by the Go assembler. Closes #387.

Change floating point format verb to `%#f` from `%#v` to ensure floating point constants are always printed with a decimal, ensuring they will be correctly interpreted by the Go assembler. Closes mmcloughlin#387.
@mmcloughlin
Copy link
Owner

@dmgard Thanks for the PR!

I expect you'll need to rerun code generation for this to work. Should be enough to run ./script/generate. You may need to run ./script/bootstrap first to setup your environment.

@mmcloughlin
Copy link
Owner

It would also be good to add a regression test for this, see the tests under:

https://github.com/mmcloughlin/avo/tree/master/tests/fixedbugs

I could also follow-up with this myself.

@codecov-commenter
Copy link

Codecov Report

Merging #388 (1611d77) into master (9e39c75) will not change coverage.
The diff coverage is n/a.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@           Coverage Diff           @@
##           master     #388   +/-   ##
=======================================
  Coverage   78.12%   78.12%           
=======================================
  Files          99       99           
  Lines       23728    23728           
=======================================
  Hits        18537    18537           
  Misses       5095     5095           
  Partials       96       96           
Flag Coverage Δ
integration 22.05% <ø> (ø)
stress ?
unittests 73.19% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@dmgard
Copy link
Author

dmgard commented Apr 23, 2023

@mmcloughlin thanks for avo!

This skipped my mind soon after I submitted it. Haven't had the time to follow-up and, at this rate, you'd probably get to it first.

@mmcloughlin
Copy link
Owner

@dmgard Thanks for bringing this to my attention and trying out a fix. I have landed a fix in #393, please let me know if it works for you.

@dmgard
Copy link
Author

dmgard commented Jun 12, 2023

@mmcloughlin great, works like a charm, 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

Successfully merging this pull request may close these issues.

operand: printing floating point literals without decimal causes invalid interpretation
3 participants