Gabe Black has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/45819 )
Change subject: base: Initialize some variables in the wide multiply
helpers.
......................................................................
base: Initialize some variables in the wide multiply helpers.
Not initializing them seems to upset older versions of g++.
Change-Id: Ib3de0460463f2fe514175484c49e1df68dacb4d3
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45819
Reviewed-by: Daniel Carvalho <[email protected]>
Reviewed-by: Matt Sinclair <[email protected]>
Maintainer: Gabe Black <[email protected]>
Tested-by: kokoro <[email protected]>
---
M src/base/intmath.hh
1 file changed, 2 insertions(+), 2 deletions(-)
Approvals:
Matt Sinclair: Looks good to me, approved
Daniel Carvalho: Looks good to me, approved
Gabe Black: Looks good to me, approved
kokoro: Regressions pass
diff --git a/src/base/intmath.hh b/src/base/intmath.hh
index 4be4a3b..78d0795 100644
--- a/src/base/intmath.hh
+++ b/src/base/intmath.hh
@@ -228,7 +228,7 @@
static constexpr std::pair<std::make_unsigned_t<T>,
std::make_unsigned_t<T>>
mulUnsigned(std::make_unsigned_t<T> val_a, std::make_unsigned_t<T> val_b)
{
- std::make_unsigned_t<T> hi, low;
+ std::make_unsigned_t<T> hi{}, low{};
mulUnsigned<T>(hi, low, val_a, val_b);
return {hi, low};
};
@@ -237,7 +237,7 @@
static constexpr std::pair<std::make_signed_t<T>, std::make_signed_t<T>>
mulSigned(std::make_signed_t<T> val_a, std::make_signed_t<T> val_b)
{
- std::make_signed_t<T> hi, low;
+ std::make_signed_t<T> hi{}, low{};
mulSigned<T>(hi, low, val_a, val_b);
return {hi, low};
};
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/45819
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: Ib3de0460463f2fe514175484c49e1df68dacb4d3
Gerrit-Change-Number: 45819
Gerrit-PatchSet: 2
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: Matt Sinclair <[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