Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[test] Suppress a bogus warning on GCC 11.4
GCC warns, even though this entire loop is guarded by `n <= size_` and we humans know that `size_ <= N`. In file SG14/test/aa_inplace_vector_smallsize_test.cpp:3: SG14/include/sg14/aa_inplace_vector.h: In member function ‘virtual void aa_inplace_vector_smallsize_ConstructorsThrow_Test::TestBody()’: SG14/include/sg14/aa_inplace_vector.h:635:28: error: iteration 3 invokes undefined behavior [-Werror=aggressive-loop-optimizations] 635 | (*this)[i] = value; | ~~~~~~~~~~~^~~~~~~ SG14/include/sg14/aa_inplace_vector.h:634:34: note: within this loop 634 | for (size_t i = 0; i < n; ++i) { | ~~^~~
- Loading branch information