mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-04-22 17:49:36 +08:00
Silence string overflow warning for GCC in initializer_list_construction test.
This looks to be a GCC bug. It doesn't seem to reproduce is a smaller example, making it hard to isolate.
This commit is contained in:
parent
5dac69ff0b
commit
9882aec279
@ -7,6 +7,13 @@
|
|||||||
// Public License v. 2.0. If a copy of the MPL was not distributed
|
// Public License v. 2.0. If a copy of the MPL was not distributed
|
||||||
// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
|
||||||
|
#if defined(__GNUC__) && __GNUC__ >= 10
|
||||||
|
// GCC 10+ has a bug for unsigned char that thinks we're writing past the
|
||||||
|
// end of an array when compiled with -O3. This warning is not triggered for
|
||||||
|
// any other types, nor for other compilers, nor for other optimization levels.
|
||||||
|
#pragma GCC diagnostic ignored "-Wstringop-overflow"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
|
|
||||||
template<typename Scalar, bool is_integer = NumTraits<Scalar>::IsInteger>
|
template<typename Scalar, bool is_integer = NumTraits<Scalar>::IsInteger>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user