Skip to content

Commit a02f1e8

Browse files
committed
Fixed static tests for SAMD and ESP8266
1 parent da09166 commit a02f1e8

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/FixMath_Autotests.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
*
99
*/
1010

11-
#if (defined(__GNUC__) && (__GNUC__ < 10)) || (__cplusplus >= 202002L)
11+
#if (defined(__GNUC__) && (__GNUC__ < 12) && !defined(ESP8266)) && !defined(ARDUINO_ARCH_SAMD) || (__cplusplus >= 202002L)
1212
// Bit-shifting negative number has not been formally defined behavior before C++ 2020, but rather technically "implementation defined". It thus
1313
// could not be used in constexpr statements (although working quite fine, at runtime).
1414
// At the time of this writing (07/2024), we do not have a c++ 2020 compiler running in our automated test workflow. However, older versions of GCC
15-
// are less pedantic, and will regard at least the case of shift by 0 bits (-1 << 0) as defined. We leverage this fact to compile as many checks as possible.
15+
// are less pedantic, at least on some platforms (not ESP8266 and SAMD apparently), and will regard at least the case of shift by 0 bits (-1 << 0) as defined. We leverage this fact to compile as many checks as possible.
1616
#define SHIFT_NEGATIVE_BY_ZERO_DEFINED 1
1717
#else
1818
#define SHIFT_NEGATIVE_BY_ZERO_DEFINED 0

0 commit comments

Comments
 (0)