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

inline to fix warnings, smaller build size (sometimes) #4369

Merged
merged 1 commit into from
Jul 21, 2016

Conversation

thinkyhead
Copy link
Member

@thinkyhead thinkyhead commented Jul 21, 2016

Background: The compiler complains because functions declared static in a shared header are only defined in one compilation unit (Marlin_main.cpp). This is easy to fix, but it would be nice if we could use static for the size reduction is produces as a side-effect.

  • Default config:
    • 52,426 without static or inline
    • 51,930 with static or inline – saves 496 bytes ?!
  • With NOZZLE_CLEAN (calling these functions from 2 code units):
    • 53,854 without static or inline
    • 53,854 with inline
    • 53,618 with static – saves 236 bytes ?!

@thinkyhead thinkyhead merged commit 824c685 into MarlinFirmware:RCBugFix Jul 21, 2016
@thinkyhead thinkyhead deleted the rc_no_static_moves branch July 21, 2016 21:46
@jbrazio jbrazio modified the milestone: 1.1.0 Jul 22, 2016
@thinkyhead thinkyhead mentioned this pull request Jul 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants