This repository was archived by the owner on Nov 17, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -200,10 +200,10 @@ class Tuple {
200
200
*/
201
201
inline ValueType& operator [](int i) {
202
202
// it fixes the false alarm of assuming signed overflow does not occur when assuming that (X - c) > X is always false [-Werror=strict-overflow]
203
- #pragma GCC diagnostic push
204
- #pragma GCC diagnostic ignored "-Wstrict-overflow"
205
- CHECK (i >= 0 && i < ndim ()) << " index = " << i << " must be in range [0, " << ndim () << " )" ;
206
- #pragma GCC diagnostic pop
203
+ #pragma GCC diagnostic push
204
+ #pragma GCC diagnostic ignored "-Wstrict-overflow"
205
+ CHECK (i >= 0 && i < ndim ()) << " index = " << i << " must be in range [0, " << ndim () << " )" ;
206
+ #pragma GCC diagnostic pop
207
207
return begin ()[i];
208
208
}
209
209
/* !
@@ -212,7 +212,11 @@ class Tuple {
212
212
* \return the corresponding dimension size
213
213
*/
214
214
inline const ValueType& operator [](int i) const {
215
+ // it fixes the false alarm of assuming signed overflow does not occur when assuming that (X - c) > X is always false [-Werror=strict-overflow]
216
+ #pragma GCC diagnostic push
217
+ #pragma GCC diagnostic ignored "-Wstrict-overflow"
215
218
CHECK (i >= 0 && i < ndim ()) << " index = " << i << " must be in range [0, " << ndim () << " )" ;
219
+ #pragma GCC diagnostic pop
216
220
return begin ()[i];
217
221
}
218
222
/* !
You can’t perform that action at this time.
0 commit comments