Skip to content

resolute: add explicit <cstdint> / <fstream> includes for GCC 15#3754

Open
nbbrooks wants to merge 1 commit into
moveit:mainfrom
nbbrooks:nbbrooks/resolute-gcc15-includes
Open

resolute: add explicit <cstdint> / <fstream> includes for GCC 15#3754
nbbrooks wants to merge 1 commit into
moveit:mainfrom
nbbrooks:nbbrooks/resolute-gcc15-includes

Conversation

@nbbrooks

Copy link
Copy Markdown
Collaborator

GCC 15 (default on Ubuntu Resolute) stopped transitively including and through other standard headers. Any translation unit that uses uint8_t / int32_t / std::endl etc. without the explicit include can fail to compile.

  • Add to 21 files (headers + cpp) that use fixed-width integer types directly. Alphabetically ordered in each include block.
  • Add to moveit_setup_simulation/src/simulation.cpp, which uses std::ofstream / std::endl with only a single project-header include. transitively brings in .

This is speculative cleanup based on the GCC 15 porting guide and upstream ros2 reports of the same class of failure; the files compile fine under GCC 13 with the change since is a no-op when the type is already visible.

Refs:

Description

Please explain the changes you made, including a reference to the related issue if applicable

Checklist

  • Required by CI: Code is auto formatted using clang-format
  • Extend the tutorials / documentation reference
  • Document API changes relevant to the user in the MIGRATION.md notes
  • Create tests, which fail without this PR reference
  • Include a screenshot if changing a GUI
  • While waiting for someone to review your request, please help review another open pull request to support the maintainers

GCC 15 (default on Ubuntu Resolute) stopped transitively including
<cstdint> and <ostream> through other standard headers. Any translation
unit that uses uint8_t / int32_t / std::endl etc. without the explicit
include can fail to compile.

- Add <cstdint> to 21 files (headers + cpp) that use fixed-width integer
  types directly. Alphabetically ordered in each include block.
- Add <fstream> to moveit_setup_simulation/src/simulation.cpp, which
  uses std::ofstream / std::endl with only a single project-header
  include. <fstream> transitively brings in <ostream>.

This is speculative cleanup based on the GCC 15 porting guide and
upstream ros2 reports of the same class of failure; the files compile
fine under GCC 13 with the change since <cstdint> is a no-op when
the type is already visible.

Refs:
- https://gcc.gnu.org/gcc-15/porting_to.html
- moveit#3603 (boost::regex vs std::regex; same class of issue)
@codecov

codecov Bot commented Jun 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 46.23%. Comparing base (e9471ff) to head (9f90b62).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3754      +/-   ##
==========================================
- Coverage   46.24%   46.23%   -0.00%     
==========================================
  Files         726      726              
  Lines       59513    59512       -1     
  Branches     7623     7623              
==========================================
- Hits        27516    27512       -4     
- Misses      31831    31832       +1     
- Partials      166      168       +2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

1 participant