forked from jcmvbkbc/crosstool-NG
-
Notifications
You must be signed in to change notification settings - Fork 66
Open
Description
Checklist
- Checked the issue tracker for similar issues to ensure this is not a duplicate
- Read the documentation to confirm the issue is not addressed there and your configuration is set correctly
- Tested with the latest version to ensure the issue hasn't been fixed
How often does this bug occurs?
always
Expected behavior
I expected frequently used functions such as std::string::append not to be inlined, at least not in -Os mode.
Actual behavior (suspected bug)
Instead, when switching from gnu++17 to gnu++2b standard std::string functions such as append, resize, instead appear to be inlined. This alone is responsible for significant binary size increase for our application.
Error logs or terminal output
No response
Steps to reproduce the behavior
test file: https://gist.github.com/rojer/81900a923fdfa7e6853afe72fa2ea87b
to change the standard: edit tools/cmake/build.cmake, change the cxx_std variable.
- output disassembly with cxx_std gnu++17: https://gist.github.com/rojer/716f2c4207306f7211f404ec25de9ffa
- output disassembly with cxx_std gnu++2b: https://gist.github.com/rojer/3a23b484d3758d04e3f1a06e0df266c4
it's obvious that in c++17 mode std::string methods are invoked while in c++2b mode they are inlined.
Project release version
14.2.0_20240906
System architecture
other (details in Additional context)
Operating system
Linux
Operating system version
Ubuntu 24.04
Shell
Bash
Additional context
IDF 5.2.2
Metadata
Metadata
Assignees
Labels
No labels