The [[noreturn]] attribute has been standard since c++11, and so we
don't (and haven't for a while) need to wrap it in a macro.
Change-Id: Ifba62c87c19224bb366e93ebba685a063cc750ce
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35218
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
// http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html
#if defined(__GNUC__) // clang or gcc
-# define M5_ATTR_NORETURN __attribute__((noreturn))
# define M5_VAR_USED __attribute__((unused))
# define M5_ATTR_PACKED __attribute__ ((__packed__))
# define M5_NO_INLINE __attribute__ ((__noinline__))
* functions, and gcc will get mad if a function calls panic and then
* doesn't return.
*/
- void exit_helper() M5_ATTR_NORETURN { exit(); ::abort(); }
+ [[noreturn]] void exit_helper() { exit(); ::abort(); }
protected:
bool enabled;
* @param err Error code from the NoMali library.
* @param msg Message to print.
*/
- static void gpuPanic(nomali_error_t err, const char *msg) M5_ATTR_NORETURN;
+ [[noreturn]] static void gpuPanic(nomali_error_t err, const char *msg);
/**
* Panic if the NoMali returned an error, do nothing otherwise.
*