[[noreturn]] instead of ATTR_NORETURN (nw)

This commit is contained in:
Miodrag Milanovic 2016-10-22 12:10:50 +02:00
parent 989c67cea4
commit 2bfd3a6ab2
3 changed files with 4 additions and 12 deletions

View File

@ -67,14 +67,8 @@ static const char g_version[] = "4.90";
#if defined(__GNUC__) && (__GNUC__ >= 3)
#define ATTR_PRINTF(x,y) __attribute__((format(printf, x, y)))
#define ATTR_NORETURN __attribute__((noreturn))
#else
#define ATTR_PRINTF(x,y)
#if defined(_MSC_VER)
#define ATTR_NORETURN __declspec(noreturn)
#else
#define ATTR_NORETURN
#endif
#endif
#define M68K_MAX_PATH 1024
@ -223,8 +217,8 @@ struct replace_struct
/* Function Prototypes */
static void ATTR_NORETURN error_exit(const char* fmt, ...) ATTR_PRINTF(1,2);
static void ATTR_NORETURN perror_exit(const char* fmt, ...) ATTR_PRINTF(1,2);
[[noreturn]] static void error_exit(const char* fmt, ...) ATTR_PRINTF(1,2);
[[noreturn]] static void perror_exit(const char* fmt, ...) ATTR_PRINTF(1,2);
static int check_strsncpy(char* dst, char* src, int maxlength);
static int check_atoi(char* str, int *result);
static int skip_spaces(char* str);

View File

@ -371,8 +371,8 @@ enum_value(T value) noexcept
// FUNCTION PROTOTYPES
//**************************************************************************
ATTR_NORETURN void fatalerror(const char *format, ...) ATTR_PRINTF(1,2);
ATTR_NORETURN void fatalerror_exitcode(running_machine &machine, int exitcode, const char *format, ...) ATTR_PRINTF(3,4);
[[noreturn]] void fatalerror(const char *format, ...) ATTR_PRINTF(1,2);
[[noreturn]] void fatalerror_exitcode(running_machine &machine, int exitcode, const char *format, ...) ATTR_PRINTF(3,4);
//**************************************************************************
// INLINE FUNCTIONS

View File

@ -33,7 +33,6 @@
/* Some optimizations/warnings cleanups for GCC */
#if defined(__GNUC__)
#define ATTR_UNUSED __attribute__((__unused__))
#define ATTR_NORETURN __attribute__((noreturn))
#define ATTR_PRINTF(x,y) __attribute__((format(printf, x, y)))
#define ATTR_CONST __attribute__((const))
#define ATTR_FORCE_INLINE __attribute__((always_inline))
@ -44,7 +43,6 @@
#define RESTRICT __restrict__
#else
#define ATTR_UNUSED
#define ATTR_NORETURN __declspec(noreturn)
#define ATTR_PRINTF(x,y)
#define ATTR_CONST
#define ATTR_FORCE_INLINE __forceinline