From 5bc74d51a4ba3307a18c421cc471a5b5e2de5558 Mon Sep 17 00:00:00 2001 From: schemborerik Date: Sat, 31 Aug 2024 03:19:26 -0700 Subject: [PATCH] For GCC10, we should check __cplusplus >= 201709L when determining if c++20 is supported (#949) --- include/etl/profiles/determine_compiler_language_support.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/etl/profiles/determine_compiler_language_support.h b/include/etl/profiles/determine_compiler_language_support.h index e8a004411..d2841d7bc 100644 --- a/include/etl/profiles/determine_compiler_language_support.h +++ b/include/etl/profiles/determine_compiler_language_support.h @@ -58,6 +58,12 @@ SOFTWARE. #endif #elif defined(ETL_COMPILER_ARM5) #define ETL_CPP20_SUPPORTED 0 + #elif defined(ETL_COMPILER_GCC) + #if (__GNUC__ == 10) + #define ETL_CPP20_SUPPORTED (__cplusplus >= 201709L) + #else + #define ETL_CPP20_SUPPORTED (__cplusplus >= 202002L) + #endif #else #define ETL_CPP20_SUPPORTED (__cplusplus >= 202002L) #endif