Gabe Black has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/35218 )
Change subject: base,dev: Use the standard attribute [[noreturn]].
......................................................................
base,dev: Use the standard attribute [[noreturn]].
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 <[email protected]>
Maintainer: Gabe Black <[email protected]>
Tested-by: kokoro <[email protected]>
---
M src/base/compiler.hh
M src/base/logging.hh
M src/dev/arm/gpu_nomali.hh
3 files changed, 2 insertions(+), 3 deletions(-)
Approvals:
Gabe Black: Looks good to me, approved; Looks good to me, approved
kokoro: Regressions pass
diff --git a/src/base/compiler.hh b/src/base/compiler.hh
index c3b2510..c2eb5d9 100644
--- a/src/base/compiler.hh
+++ b/src/base/compiler.hh
@@ -46,7 +46,6 @@
// 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__))
diff --git a/src/base/logging.hh b/src/base/logging.hh
index f56420b..29a9563 100644
--- a/src/base/logging.hh
+++ b/src/base/logging.hh
@@ -121,7 +121,7 @@
* 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;
diff --git a/src/dev/arm/gpu_nomali.hh b/src/dev/arm/gpu_nomali.hh
index 1880ec6..8c3ac26 100644
--- a/src/dev/arm/gpu_nomali.hh
+++ b/src/dev/arm/gpu_nomali.hh
@@ -99,7 +99,7 @@
* @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.
*
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/35218
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Ifba62c87c19224bb366e93ebba685a063cc750ce
Gerrit-Change-Number: 35218
Gerrit-PatchSet: 4
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-Reviewer: Andreas Sandberg <[email protected]>
Gerrit-Reviewer: Bobby R. Bruce <[email protected]>
Gerrit-Reviewer: Daniel Carvalho <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Nikos Nikoleris <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s