Bobby R. Bruce has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/45800 )
Change subject: arch-riscv: Fix struct causing compilation errors in
clang-11
......................................................................
arch-riscv: Fix struct causing compilation errors in clang-11
Clang 11 threw the following error: `anonymous non-C-compatible type
given name for linkage purposes by typedef declaration; add a tag name
here`.
Clang 11 enforces a restriction on giving non-C-compatible anonymous
structs a typedef name for linking purposes. This change to the C++
standard is discussed here http://wg21.link/p1766r1 and has been
retroactively applied to all C++ standard versions.
Change-Id: I87d84b9a3a842066cd4f61968ceee3fcad267b6f
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45800
Reviewed-by: Gabe Black <gabe.bl...@gmail.com>
Maintainer: Bobby R. Bruce <bbr...@ucdavis.edu>
Tested-by: kokoro <noreply+kok...@google.com>
---
M src/arch/riscv/pmp.hh
1 file changed, 3 insertions(+), 2 deletions(-)
Approvals:
Gabe Black: Looks good to me, approved
Bobby R. Bruce: Looks good to me, approved
kokoro: Regressions pass
diff --git a/src/arch/riscv/pmp.hh b/src/arch/riscv/pmp.hh
index 57cb06b..3051a6a 100644
--- a/src/arch/riscv/pmp.hh
+++ b/src/arch/riscv/pmp.hh
@@ -88,14 +88,15 @@
int numRules;
/** single pmp entry struct*/
- typedef struct {
+ struct PmpEntry
+ {
/** addr range corresponding to a single pmp entry */
AddrRange pmpAddr = AddrRange(0, 0);
/** raw addr in pmpaddr register for a pmp entry */
Addr rawAddr;
/** pmpcfg reg value for a pmp entry */
uint8_t pmpCfg = 0;
- } PmpEntry;
+ };
/** a table of pmp entries */
std::vector<PmpEntry> pmpTable;
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/45800
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: I87d84b9a3a842066cd4f61968ceee3fcad267b6f
Gerrit-Change-Number: 45800
Gerrit-PatchSet: 3
Gerrit-Owner: Bobby R. Bruce <bbr...@ucdavis.edu>
Gerrit-Reviewer: Bobby R. Bruce <bbr...@ucdavis.edu>
Gerrit-Reviewer: Gabe Black <gabe.bl...@gmail.com>
Gerrit-Reviewer: Jason Lowe-Power <ja...@lowepower.com>
Gerrit-Reviewer: kokoro <noreply+kok...@google.com>
Gerrit-CC: Jason Lowe-Power <power...@gmail.com>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s