Skip to content

Commit

Permalink
Use [[noreturn]]
Browse files Browse the repository at this point in the history
  • Loading branch information
Desour authored and sfan5 committed Jun 15, 2023
1 parent 5e6d144 commit 6a05d63
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/debug.h
Expand Up @@ -30,10 +30,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#ifdef _MSC_VER
#include <eh.h>
#endif
#define NORETURN __declspec(noreturn)
#define FUNCTION_NAME __FUNCTION__
#else
#define NORETURN __attribute__ ((__noreturn__))
#define FUNCTION_NAME __PRETTY_FUNCTION__
#endif

Expand All @@ -48,7 +46,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,

/* Abort program execution immediately
*/
NORETURN extern void fatal_error_fn(
[[noreturn]] extern void fatal_error_fn(
const char *msg, const char *file,
unsigned int line, const char *function);

Expand All @@ -66,7 +64,7 @@ NORETURN extern void fatal_error_fn(
defined)
*/

NORETURN extern void sanity_check_fn(
[[noreturn]] extern void sanity_check_fn(
const char *assertion, const char *file,
unsigned int line, const char *function);

Expand Down

0 comments on commit 6a05d63

Please sign in to comment.