Skip to content

[sdf] fix array-bounds warning on GCC 13 for predicateLibrary.h#4032

Open
nvidia-jomiller wants to merge 1 commit intoPixarAnimationStudios:devfrom
NVIDIA-Omniverse:dev-array-bounds-warn-gcc-predicate-lib
Open

[sdf] fix array-bounds warning on GCC 13 for predicateLibrary.h#4032
nvidia-jomiller wants to merge 1 commit intoPixarAnimationStudios:devfrom
NVIDIA-Omniverse:dev-array-bounds-warn-gcc-predicate-lib

Conversation

@nvidia-jomiller
Copy link
Copy Markdown
Collaborator

Replace std::vector<bool> with std::vector<uint8_t> for boundArgs.
The vector<bool> bit-packing specialization triggers -Warray-bounds and
-Wstringop-overflow when its word-level memmove is inlined into
_TryBindArgs; uint8_t uses the standard path GCC analyzes correctly.

Description of Change(s)

Link to proposal (if applicable)

Fixes Issue(s)

Checklist

  Replace std::vector<bool> with std::vector<uint8_t> for boundArgs.
  The vector<bool> bit-packing specialisation triggers -Warray-bounds and
  -Wstringop-overflow when its word-level memmove is inlined into
  _TryBindArgs; uint8_t uses the standard path GCC analyzes correctly.
@nvidia-jomiller
Copy link
Copy Markdown
Collaborator Author

Another way to deal with the warning caused by the vector<bool> specialization is to suppress the warning at boundArgs.assign.

@jesschimein
Copy link
Copy Markdown
Collaborator

Filed as internal issue #USD-12074

(This is an automated message. See here for more information.)

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.

2 participants