Gabe Black has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/45719 )
Change subject: base: Avoid an unused expression error in
GEM5_DEPRECATED_MACRO.
......................................................................
base: Avoid an unused expression error in GEM5_DEPRECATED_MACRO.
If the lambda in that macro is not actually called, clang complains
about an unused expression which breaks the build.
Change-Id: Id8708944cbac4c937e833583da0c2c18422230c0
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45719
Reviewed-by: Daniel Carvalho <[email protected]>
Maintainer: Bobby R. Bruce <[email protected]>
Tested-by: kokoro <[email protected]>
---
M src/base/compiler.hh
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
Daniel Carvalho: Looks good to me, approved
Bobby R. Bruce: Looks good to me, approved
kokoro: Regressions pass
diff --git a/src/base/compiler.hh b/src/base/compiler.hh
index ba2a4bc..17124be 100644
--- a/src/base/compiler.hh
+++ b/src/base/compiler.hh
@@ -132,7 +132,7 @@
// The definition must be an c++ expression and not a statement because of
how
// the original macro is wrapped.
# define GEM5_DEPRECATED_MACRO(name, definition, message) \
- ([](){GEM5_DEPRECATED(message) int name{}; return name;},
(definition))
+ ([](){GEM5_DEPRECATED(message) int name{}; return name;}(),
(definition))
// This version is for macros which are statement-like, which frequently
use
// "do {} while (0)" to make their syntax look more like normal c++
statements.
# define GEM5_DEPRECATED_MACRO_STMT(name, definition, message) \
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/45719
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: Id8708944cbac4c937e833583da0c2c18422230c0
Gerrit-Change-Number: 45719
Gerrit-PatchSet: 3
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-Reviewer: Bobby R. Bruce <[email protected]>
Gerrit-Reviewer: Daniel Carvalho <[email protected]>
Gerrit-Reviewer: Gabe Black <[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