<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 21, 2016 at 7:33 AM, Sebastian Huber <span dir="ltr"><<a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-brains.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><br>
<br>
On 21/03/16 13:31, Joel Sherrill wrote:<span class=""><br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
<br>
On Mon, Mar 21, 2016 at 1:26 AM, Sebastian Huber <<a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-brains.de</a> <mailto:<a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-brains.de</a>>> wrote:<br>
<br>
<br>
<br>
    On 20/03/16 21:40, Joel Sherrill wrote:<br>
<br>
        ---<br>
          cpukit/libstdthreads/thrd.c | 3 +++<br>
          1 file changed, 3 insertions(+)<br>
<br>
        diff --git a/cpukit/libstdthreads/thrd.c<br>
        b/cpukit/libstdthreads/thrd.c<br>
        index c2e439f..cc2d20f 100644<br>
        --- a/cpukit/libstdthreads/thrd.c<br>
        +++ b/cpukit/libstdthreads/thrd.c<br>
        @@ -96,6 +96,9 @@ thrd_exit(int res)<br>
          {<br>
                pthread_exit((void *)(intptr_t)res);<br>
        +       #if defined(__GNUC__)<br>
        +               __builtin_unreachable();<br>
        +       #endif<br>
          }<br>
            int<br>
<br>
<br>
    We should fix the pthread_exit() declaration instead, e.g. FreeBSD<br>
    has this:<br>
<br>
    void          pthread_exit(void *) __dead2;<br>
<br>
Does that map to gcc noreturn? And does newlib have that?<br>
</blockquote>
<br></span>
Yes, or Noreturn if you use the appropriate C++ version. Needs <sys/cdefs.h>.<div class=""><div class="h5"><br></div></div></blockquote><div><br></div><div>That moves the noreturn warning. </div><div><br></div><div>/data/home/joel/test-gcc/install-head/sparc-rtems4.12/include/pthread.h: In function 'pthread_exit':</div><div>../../../../../../rtems/c/src/../../cpukit/posix/src/pthreadexit.c:78:1: warning: 'noreturn' function does return</div><div> }</div><div> ^</div><div> </div><div>Other than marking pthread_exit's return as unreachable, do you have another suggestion?</div><div><br></div><div>--joel</div></div></div></div>