- Notifications
You must be signed in to change notification settings - Fork13.3k
restore dtostrf when floats are disabled in printf/scanf + round fix#7093
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation
earlephilhower left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Looks like theif (function pointer) is not optimized. Both branches are present in all builds (float and non-float). That gives a 554-byte function in both cases. In normal mode, ~500 of those bytes are never used (the __dtostrf inlined code), and in non-float mode ~50 of those aren't used (the printf() branch).
I think this may be the best we can hope for, without adding a new#define like your original PR, so I'm approving as-is. If someone else has any ideas, I'd be interested...
d-a-v commentedFeb 20, 2020
I am too interested in another solution because I see only the use of the define to not have the real implementation when printf-float is available. That's because the symbol presence cannot be known at compile time. @earlephilhower with a patch to newlib, we could condition linking of |
Uh oh!
There was an error while loading.Please reload this page.
d-a-v commentedFeb 21, 2020
diff from original dtostrf is |
Uh oh!
There was an error while loading.Please reload this page.
replaces andcloses#7087
(edit: tested)
fixes#7073 with solution 6
updates#7068
fixes#7043
(no need for
-DNOPRINTFLOAT)