From 5fc7a776d5e312d01c17beba9474d72edde2f92d Mon Sep 17 00:00:00 2001 From: Christopher Kormanyos Date: Tue, 19 Dec 2023 10:19:21 +0100 Subject: [PATCH] Repair GCC patch for GCC 12 and higher --- ref_app/src/mcal/mcal_gcc_cxx_completion.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ref_app/src/mcal/mcal_gcc_cxx_completion.cpp b/ref_app/src/mcal/mcal_gcc_cxx_completion.cpp index b6de699d3..8531eaa66 100644 --- a/ref_app/src/mcal/mcal_gcc_cxx_completion.cpp +++ b/ref_app/src/mcal/mcal_gcc_cxx_completion.cpp @@ -71,6 +71,9 @@ void* operator new(std::size_t size) noexcept } void operator delete(void*) noexcept { } +#if (defined(__GNUC__) && (__GNUC__ >= 12)) +inline +#endif void operator delete(void*, void*) noexcept { } #if(__cplusplus >= 201400L) void operator delete(void*, std::size_t) noexcept { } @@ -145,11 +148,8 @@ extern "C" namespace std { - void __throw_out_of_range_fmt(char const*, ...); - - void __throw_out_of_range_fmt(char const*, ...) - { - } + [[noreturn]] + void __throw_out_of_range_fmt(char const*, ...) { for(;;) { ; } } } #if defined(__GNUC__)