1
0
mirror of https://github.com/ThrowTheSwitch/Unity.git synced 2026-01-24 08:51:36 +01:00

Add IAR specific mapping for UNITY_NORETURN

This commit is contained in:
Roland Stahn
2025-05-27 14:33:15 +02:00
committed by GitHub
parent 9578ffd885
commit 3fb2484313

View File

@@ -87,6 +87,13 @@
/* Since C23, the keyword _Noreturn has been replaced by the attribute noreturn, based on: */
/* https://en.cppreference.com/w/c/language/attributes/noreturn */
#define UNITY_NORETURN [[ noreturn ]]
#elif defined(__IAR_SYSTEMS_ICC__) && (__IAR_SYSTEMS_ICC__ >= 8)
/* For IAR compilers supporting at least C99 use the IAR specific '__noreturn' keyword */
/* Based on tests and: */
/* https://wwwfiles.iar.com/arm/webic/doc/EWARM_DevelopmentGuide.ENU.pdf */
/* https://wwwfiles.iar.com/AVR/webic/doc/EWAVR_CompilerGuide.pdf */
/* https://wwwfiles.iar.com/msp430/webic/doc/EW430_CompilerReference.pdf */
#define UNITY_NORETURN __noreturn
#endif
#endif
#ifndef UNITY_NORETURN