<div dir="ltr">This looks OK. Push it.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Oct 6, 2020 at 1:06 AM Sebastian Huber <<a href="mailto:sebastian.huber@embedded-brains.de">sebastian.huber@embedded-brains.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Provide RTEMS_NO_RETURN also in case RTEMS_DEBUG is defined to prevent errors<br>
like this:<br>
<br>
error: no return statement in function returning non-void [-Werror=return-type]<br>
<br>
Use C11 and C++11 standard means to declare a no-return function.<br>
<br>
Close #4122.<br>
---<br>
cpukit/include/rtems/score/basedefs.h | 8 +++++---<br>
1 file changed, 5 insertions(+), 3 deletions(-)<br>
<br>
diff --git a/cpukit/include/rtems/score/basedefs.h b/cpukit/include/rtems/score/basedefs.h<br>
index c31b4ebef7..0244af1471 100644<br>
--- a/cpukit/include/rtems/score/basedefs.h<br>
+++ b/cpukit/include/rtems/score/basedefs.h<br>
@@ -94,9 +94,11 @@<br>
* can impact the code generated following calls to<br>
* rtems_fatal_error_occurred and _Terminate.<br>
*/<br>
-#if defined(RTEMS_SCHEDSIM)<br>
- #define RTEMS_NO_RETURN<br>
-#elif defined(__GNUC__) && !defined(RTEMS_DEBUG)<br>
+#if __cplusplus >= 201103L<br>
+ #define RTEMS_NO_RETURN [[noreturn]]<br>
+#elif __STDC_VERSION__ >= 201112L<br>
+ #define RTEMS_NO_RETURN _Noreturn<br>
+#elif defined(__GNUC__)<br>
#define RTEMS_NO_RETURN __attribute__((__noreturn__))<br>
#else<br>
#define RTEMS_NO_RETURN<br>
-- <br>
2.26.2<br>
<br>
_______________________________________________<br>
devel mailing list<br>
<a href="mailto:devel@rtems.org" target="_blank">devel@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/devel</a><br>
</blockquote></div>