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 <odanrc@yahoo.com.br> Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
@@ -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) \
|
||||
|
||||
Reference in New Issue
Block a user