File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5555#endif
5656
5757#ifndef __NO_RETURN
58- #if defined(__cplusplus) && __cplusplus >= 201103L
58+ #if defined(__has_attribute) && __has_attribute(__noreturn__)
59+ #define __NO_RETURN __attribute__ ((__noreturn__))
60+ #elif defined (__cplusplus) && __cplusplus >= 201103L
5961 #define __NO_RETURN [[noreturn]]
6062 #elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
6163 #define __NO_RETURN _Noreturn
Original file line number Diff line number Diff line change @@ -169,7 +169,8 @@ __STATIC_FORCEINLINE uint32_t NVIC_GetVector(IRQn_Type IRQn)
169169\brief Inform the compiler that a function does not return.
170170\details
171171Informs the compiler that the function does not return. The compiler can then perform optimizations by
172- removing code that is never reached.
172+ removing code that is never reached. For maximum portability, this should only be used where the C/C++
173+ standard allows it.
173174
174175<b>Code Example:</b>
175176\code
Original file line number Diff line number Diff line change @@ -107,7 +107,8 @@ __STATIC_FORCEINLINE uint32_t NVIC_GetVector(IRQn_Type IRQn)
107107\brief Inform the compiler that a function does not return.
108108\details
109109Informs the compiler that the function does not return. The compiler can then perform optimizations by
110- removing code that is never reached.
110+ removing code that is never reached. For maximum portability, this should only be used where the C/C++
111+ standard allows it.
111112
112113<b> Code Example:</b>
113114\code
You can’t perform that action at this time.
0 commit comments