Open
Conversation
since C++20, 'module' is a reserved keyword
This prevented compilation using clang++ and C++ 26 standard: error: comparison between two arrays is ill-formed in C++26; to compare array addresses, use unary '+' to decay operands to pointers [-Warray-compare-cxx26]
jengelh
reviewed
May 22, 2025
|
|
||
| if (static_wb->anim_start_frame != static_wb->anim_end_frame) { | ||
| // LGT: Awkward array comparison by pointer, needs investivation to understand the actual intent | ||
| if (+static_wb->anim_start_frame != static_wb->anim_end_frame) { |
Contributor
There was a problem hiding this comment.
Because both LHS and RHS are arrays in their own right, the comparison always evaluates to true and should be deleted altogether.
Member
Author
There was a problem hiding this comment.
You're right this test is bogus, I kept it alive to highlight a potential bug that needs to be looked into.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Type
Description
Fix compilation for clang when setting C++ standard to 26 (
set(CMAKE_CXX_STANDARD 26))Related Issues
Additions to #686 for clang. #686 only handled GCC compilation