aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIain Sandoe <iain@sandoe.co.uk>2023-01-07 15:27:01 +0000
committerIain Sandoe <iain@sandoe.co.uk>2023-01-07 19:39:59 +0000
commit2d2edf108026b7e2591900f995bc558ce8d45c6d (patch)
treed06fde30a8918e43db8dcbd99c5fdbf1741a3350
parent727bd5d478ff8035e4f26e939d690fd3752d4133 (diff)
downloadgcc-2d2edf108026b7e2591900f995bc558ce8d45c6d.zip
gcc-2d2edf108026b7e2591900f995bc558ce8d45c6d.tar.gz
gcc-2d2edf108026b7e2591900f995bc558ce8d45c6d.tar.bz2
modula-2, libm2min: Declare abort and exit as expected.
The build is currently emitting a warning that abort() is declared differently from the built-in. This updates the declaration to match expectations. Signed-off-by: Iain Sandoe <iain@sandoe.co.uk> gcc/m2/ChangeLog: * gm2-libs-min/libc.c (abort): Update declaration to match the expected form, add no-return attribute. (exit): Add no-return attribute.
-rw-r--r--gcc/m2/gm2-libs-min/libc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/m2/gm2-libs-min/libc.c b/gcc/m2/gm2-libs-min/libc.c
index b39bfff..8cddb5d 100644
--- a/gcc/m2/gm2-libs-min/libc.c
+++ b/gcc/m2/gm2-libs-min/libc.c
@@ -24,10 +24,10 @@ a copy of the GCC Runtime Library Exception along with this program;
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */
-void abort (int);
-void exit (int);
+extern void abort (void) __attribute__ ((__noreturn__));
+extern void exit (int) __attribute__ ((__noreturn__));
-void abort (int i)
+void abort (void)
{
while (1)
;