From: Iain Sandoe Date: Sat, 7 Jan 2023 15:27:01 +0000 (+0000) Subject: modula-2, libm2min: Declare abort and exit as expected. X-Git-Tag: basepoints/gcc-14~2150 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2d2edf108026b7e2591900f995bc558ce8d45c6d;p=thirdparty%2Fgcc.git 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 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. --- diff --git a/gcc/m2/gm2-libs-min/libc.c b/gcc/m2/gm2-libs-min/libc.c index b39bfffb65c3..8cddb5dd7b40 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 . */ -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) ;