-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Description
#742 introduced a mapping of the define UNITY_NORETURN for different C/C++ standards and specific compilers (GCC, Visual Studio, etc.). This mapping can be extended for IAR compilers which provide a __noreturn keyword. This seems to be supported by IAR compilers for different platforms (ARM, AVR, MSP430), which can be identified by the define __IAR_SYSTEMS_ICC__ providing an indication for the compiler platform version (see also cmake IAR compiler identifcation).
Proposed code extension:
#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 __noreturnRecent IAR compiler versions support the latest C11/C21 and CPP standards and already use the standard-conform mappings. The addition therefore mainly aims at older compiler versions supporting C99 only.
Metadata
Metadata
Assignees
Labels
No labels