From 48c612e9cc66f735741c53e5f27727ddcb5c642e Mon Sep 17 00:00:00 2001 From: Riccardo Mereu Date: Mon, 7 Oct 2024 16:30:19 +0200 Subject: [PATCH] Switch to gnu++17 for GIGA --- cores/arduino/Arduino.h | 2 ++ variants/GIGA/cxxflags.txt | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/cores/arduino/Arduino.h b/cores/arduino/Arduino.h index 4095321e5..462d785d4 100644 --- a/cores/arduino/Arduino.h +++ b/cores/arduino/Arduino.h @@ -57,10 +57,12 @@ extern "C"{ #define NOT_AN_INTERRUPT 255 // undefine stdlib's abs if encountered +#if __cplusplus < 201703L #ifdef abs #undef abs #endif // abs #define abs(x) ((x)>0?(x):-(x)) +#endif #define interrupts() __enable_irq() #define noInterrupts() __disable_irq() diff --git a/variants/GIGA/cxxflags.txt b/variants/GIGA/cxxflags.txt index 24d860cfa..14fc8c636 100644 --- a/variants/GIGA/cxxflags.txt +++ b/variants/GIGA/cxxflags.txt @@ -1,7 +1,7 @@ -Wvla -c -fno-rtti --std=gnu++14 +-std=gnu++17 -DAPPLICATION_ADDR=0x8040000 -DAPPLICATION_RAM_ADDR=0x24000000 -DAPPLICATION_RAM_SIZE=0x80000