Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion include/matx/core/tensor_desc.h
Original file line number Diff line number Diff line change
Expand Up @@ -313,9 +313,14 @@ IGNORE_WARNING_POP_GCC

/* In release mode with O3 on g++ seems to give incorrect warnings on this line from Clone()
and clone(). It appears there's no valid code path that would cause this to be unitialized,
so we're ignoring the warning in this one spot. */
so we're ignoring the warning in this one spot. gcc also incorrectly reports:
error: array subscript 3 is outside array bounds of. This is impossible in the case it's reporting
since it comes from a clone where the loop inside of clone() is a compile-time constant of 2,
so it can never count up to 3. */
IGNORE_WARNING_PUSH_GCC("-Wmaybe-uninitialized")
IGNORE_WARNING_PUSH_GCC("-Warray-bounds")
return *(stride_.begin() + dim);
IGNORE_WARNING_POP_GCC
IGNORE_WARNING_POP_GCC
}

Expand Down