[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
MiNT 1.10: update for gcc 2.5, function never returns
This patch updates the sources to use the new way of gcc to declare
that a function never returns, by adding `__attribute__((noreturn))'
to the declaration.
diff -ur orig/debug.c ./debug.c
--- orig/debug.c Mon Sep 27 22:35:48 1993
+++ ./debug.c Sat Feb 19 12:06:02 1994
@@ -535,7 +535,7 @@
int scan;
extern long tosssp; /* in main.c */
#ifdef PROFILING
- extern EXITING _exit P_((int));
+ extern EXITING _exit P_((int)) NORETURN;
#endif
restr_intr(); /* restore interrupts to normal */
#ifdef DEBUG_INFO
diff -ur orig/file.h ./file.h
--- orig/file.h Tue Feb 15 23:21:30 1994
+++ ./file.h Thu Feb 17 21:14:30 1994
@@ -208,7 +208,7 @@
void ARGS_ON_STACK (*trace) P_((const char *, ...));
void ARGS_ON_STACK (*debug) P_((const char *, ...));
void ARGS_ON_STACK (*alert) P_((const char *, ...));
- EXITING void ARGS_ON_STACK (*fatal) P_((const char *, ...));
+ EXITING void ARGS_ON_STACK (*fatal) P_((const char *, ...)) NORETURN;
/* memory allocation functions */
void * ARGS_ON_STACK (*kmalloc) P_((long));
diff -ur orig/mint.h ./mint.h
--- orig/mint.h Fri Feb 11 19:38:38 1994
+++ ./mint.h Thu Feb 17 21:01:48 1994
@@ -59,9 +59,19 @@
*/
#ifdef __GNUC__
-#define EXITING volatile /* function never returns */
+#if __GNUC__ > 2 || __GNUC_MINOR__ >= 5
+#define NORETURN __attribute__ ((noreturn)) /* function never returns */
#else
+#define EXITING volatile /* function never returns */
+#endif
+#endif
+
+#ifndef EXITING
#define EXITING
+#endif
+
+#ifndef NORETURN
+#define NORETURN
#endif
#ifdef dLibs
diff -ur orig/proto.h ./proto.h
--- orig/proto.h Fri Feb 11 19:35:00 1994
+++ ./proto.h Thu Feb 17 21:21:24 1994
@@ -353,8 +353,8 @@
void ARGS_ON_STACK ALERT P_((const char *s, ...));
void ARGS_ON_STACK FORCE P_((const char *s, ...));
void PAUSE P_((void));
-EXITING void ARGS_ON_STACK FATAL P_((const char *s, ...));
-EXITING void HALT P_((void));
+EXITING void ARGS_ON_STACK FATAL P_((const char *, ...)) NORETURN;
+EXITING void HALT P_((void)) NORETURN;
void DUMPLOG P_((void));
void do_func_key P_((int));