Gabe Black has uploaded this change for review. ( 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
---
M src/base/compiler.hh
1 file changed, 1 insertion(+), 1 deletion(-)



diff --git a/src/base/compiler.hh b/src/base/compiler.hh
index 4ea0dbb..13d38c4 100644
--- a/src/base/compiler.hh
+++ b/src/base/compiler.hh
@@ -122,7 +122,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: 1
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to