mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-30 00:41:17 +01:00
Merge pull request #892 from OlegHahm/crash_noreturn
cpu: satisfy compiler in crash.c for ARM and MSP430
This commit is contained in:
commit
f3024916ef
@ -60,4 +60,14 @@ NORETURN void core_panic(int crash_code, const char *message)
|
||||
/* DEVELHELP not set => reboot system */
|
||||
(void) reboot(RB_AUTOBOOT);
|
||||
#endif
|
||||
|
||||
/* tell the compiler that we won't return from this function
|
||||
(even if we actually won't even get here...) */
|
||||
#if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ >= 5)
|
||||
__builtin_unreachable();
|
||||
#else
|
||||
while (1) {
|
||||
/* do nothing, but do it often */
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -61,4 +61,14 @@ NORETURN void core_panic(int crash_code, const char *message)
|
||||
/* DEVELHELP not set => reboot system */
|
||||
(void) reboot(RB_AUTOBOOT);
|
||||
#endif
|
||||
|
||||
/* tell the compiler that we won't return from this function
|
||||
(even if we actually won't even get here...) */
|
||||
#if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ >= 5)
|
||||
__builtin_unreachable();
|
||||
#else
|
||||
while (1) {
|
||||
/* do nothing, but do it often */
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -60,4 +60,14 @@ NORETURN void core_panic(int crash_code, const char *message)
|
||||
/* DEVELHELP not set => reboot system */
|
||||
(void) reboot(RB_AUTOBOOT);
|
||||
#endif
|
||||
|
||||
/* tell the compiler that we won't return from this function
|
||||
(even if we actually won't even get here...) */
|
||||
#if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ >= 5)
|
||||
__builtin_unreachable();
|
||||
#else
|
||||
while (1) {
|
||||
/* do nothing, but do it often */
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -58,9 +58,13 @@ NORETURN void core_panic(int crash_code, const char *message)
|
||||
(void) reboot(RB_AUTOBOOT);
|
||||
#endif
|
||||
|
||||
/* proove the compiler that we won't return from this function
|
||||
/* tell the compiler that we won't return from this function
|
||||
(even if we actually won't even get here...) */
|
||||
#if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ >= 5)
|
||||
__builtin_unreachable();
|
||||
#else
|
||||
while (1) {
|
||||
/* nothing in particular */;
|
||||
/* do nothing, but do it often */
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user