Skip to content

Fix warnings with GCC14 and C++23 #27768

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

Merged
merged 1 commit into from
Apr 1, 2025

Conversation

bmourit
Copy link
Contributor

@bmourit bmourit commented Mar 29, 2025

Description

This fixes two warnings found in the planner.h/.cpp code when building using GCC14 and C++23. Also removed the flag to suppress the warning for the GD32 MFL platform.

Note:
Unfortunately, GD32 still needs to suppress deprecated warnings due to the latest Arduino API (Binary.h) causing spam with C++14 and later and not using binary literals. However, changing to binary literals in Marlin would break building with older compilers and other platforms.

Requirements

None

Benefits

No build warnings.

Related Issues

Fixes #27767

…ified left operand is deprecated [-Wvolatile]' from planner when using GCC 14 and C++23 and remove suppression flags from .ini file
@thinkyhead
Copy link
Member

Too bad we can't specify warning flags just for certain headers and source files without adding separate linker steps. The main thing, ultimately, is to get a reasonable optimized binary for release and a debuggable binary for development. In general this old schooner is holding together well, and the next slate of refactors will continue to raise it up a bit more….

@thinkyhead thinkyhead merged commit c13ab76 into MarlinFirmware:bugfix-2.1.x Apr 1, 2025
65 checks passed
@bmourit
Copy link
Contributor Author

bmourit commented Apr 1, 2025

Yes I agree. It is an Arduino warning anyway for their preference binary literals. It is the only warning though, and Marlin was very clean!

@bmourit bmourit deleted the gcc14_c++23_fixes branch April 24, 2025 16:49
EvilGremlin pushed a commit to EvilGremlin/Marlin that referenced this pull request May 15, 2025
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.

[BUG] Building with GCC14 and C++23 causes 'volatile-qualified left operand' warnings
3 participants