diff --git a/src/common/Debugging/Errors.h b/src/common/Debugging/Errors.h index 8173d4d6d..0a109ca22 100644 --- a/src/common/Debugging/Errors.h +++ b/src/common/Debugging/Errors.h @@ -12,20 +12,20 @@ namespace Acore { - DECLSPEC_NORETURN void Assert(char const* file, int line, char const* function, std::string const& debugInfo, char const* message) ATTR_NORETURN; - DECLSPEC_NORETURN void Assert(char const* file, int line, char const* function, std::string const& debugInfo, char const* message, char const* format, ...) ATTR_NORETURN ATTR_PRINTF(6, 7); + [[noreturn]] void Assert(char const* file, int line, char const* function, std::string const& debugInfo, char const* message); + [[noreturn]] void Assert(char const* file, int line, char const* function, std::string const& debugInfo, char const* message, char const* format, ...) ATTR_PRINTF(6, 7); - DECLSPEC_NORETURN void Fatal(char const* file, int line, char const* function, char const* message, ...) ATTR_NORETURN ATTR_PRINTF(4, 5); + [[noreturn]] void Fatal(char const* file, int line, char const* function, char const* message, ...) ATTR_PRINTF(4, 5); - DECLSPEC_NORETURN void Error(char const* file, int line, char const* function, char const* message) ATTR_NORETURN; + [[noreturn]] void Error(char const* file, int line, char const* function, char const* message); - DECLSPEC_NORETURN void Abort(char const* file, int line, char const* function) ATTR_NORETURN; + [[noreturn]] void Abort(char const* file, int line, char const* function); - DECLSPEC_NORETURN void Abort(char const* file, int line, char const* function, char const* message, ...) ATTR_NORETURN; + [[noreturn]] void Abort(char const* file, int line, char const* function, char const* message, ...); void Warning(char const* file, int line, char const* function, char const* message); - DECLSPEC_NORETURN void AbortHandler(int sigval) ATTR_NORETURN; + [[noreturn]] void AbortHandler(int sigval); } // namespace Acore diff --git a/src/common/Define.h b/src/common/Define.h index 8f838b2db..59f075e5f 100644 --- a/src/common/Define.h +++ b/src/common/Define.h @@ -26,16 +26,8 @@ #if AC_PLATFORM == AC_PLATFORM_WINDOWS # define ACORE_PATH_MAX MAX_PATH # define _USE_MATH_DEFINES -# ifndef DECLSPEC_NORETURN -# define DECLSPEC_NORETURN __declspec(noreturn) -# endif //DECLSPEC_NORETURN -# ifndef DECLSPEC_DEPRECATED -# define DECLSPEC_DEPRECATED __declspec(deprecated) -# endif //DECLSPEC_DEPRECATED #else //AC_PLATFORM != AC_PLATFORM_WINDOWS # define ACORE_PATH_MAX PATH_MAX -# define DECLSPEC_NORETURN -# define DECLSPEC_DEPRECATED #endif //AC_PLATFORM #if !defined(COREDEBUG) @@ -48,13 +40,9 @@ #endif //!COREDEBUG #if AC_COMPILER == AC_COMPILER_GNU -# define ATTR_NORETURN __attribute__((noreturn)) # define ATTR_PRINTF(F, V) __attribute__ ((format (printf, F, V))) -# define ATTR_DEPRECATED __attribute__((deprecated)) #else //AC_COMPILER != AC_COMPILER_GNU -# define ATTR_NORETURN # define ATTR_PRINTF(F, V) -# define ATTR_DEPRECATED #endif //AC_COMPILER == AC_COMPILER_GNU #ifdef ACORE_API_USE_DYNAMIC_LINKING