Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Lyon <christophe.lyon@linaro.org>2018-10-01 18:52:42 +0300
committerRichard Earnshaw <Richard.Earnshaw@arm.com>2018-10-08 16:35:43 +0300
commit8a7536e91d7dc361adf9b66c4e14e9596c0b0ccc (patch)
tree503cdaa04804920694cd028186d3c0669c1ac17c /libgloss/arm
parentf53ce0112552166df728bafce57739756a304108 (diff)
[ARM] Make _kill() a noreturn function.
AngelSWI_Reason_ReportException does not return accoring to the ARM documentation, so it is valid to mark _kill() as noreturn. This way, the compiler does not warn about _exit() returning a value despite being noreturn. 2018-10-01 Christophe Lyon <christophe.lyon@linaro.org> * libgloss/arm/_exit.c (_exit): Declare _kill() as noreturn. * libgloss/arm/_exit.c (_kill): Likewise. Remove the return statements. * newlib/libc/sys/arm/syscalls.c (_kill): Likewise..
Diffstat (limited to 'libgloss/arm')
-rw-r--r--libgloss/arm/_exit.c2
-rw-r--r--libgloss/arm/_kill.c8
2 files changed, 6 insertions, 4 deletions
diff --git a/libgloss/arm/_exit.c b/libgloss/arm/_exit.c
index ca2d21c43..4a071df58 100644
--- a/libgloss/arm/_exit.c
+++ b/libgloss/arm/_exit.c
@@ -1,6 +1,6 @@
#include <_ansi.h>
-int _kill (int, int);
+int _kill (int, int) __attribute__((__noreturn__));
void _exit (int);
void
diff --git a/libgloss/arm/_kill.c b/libgloss/arm/_kill.c
index 278ded73a..34a6ffddf 100644
--- a/libgloss/arm/_kill.c
+++ b/libgloss/arm/_kill.c
@@ -2,7 +2,7 @@
#include <signal.h>
#include "swi.h"
-int _kill (int, int);
+int _kill (int, int) __attribute__((__noreturn__));
int
_kill (int pid, int sig)
@@ -41,12 +41,14 @@ _kill (int pid, int sig)
#if SEMIHOST_V2
if (_has_ext_exit_extended ())
- return do_AngelSWI (insn, block);
+ do_AngelSWI (insn, block);
else
#endif
- return do_AngelSWI (insn, (void*)block[0]);
+ do_AngelSWI (insn, (void*)block[0]);
#else
asm ("swi %a0" :: "i" (SWI_Exit));
#endif
+
+ __builtin_unreachable();
}