Giacomo Travaglini has submitted this change and it was merged. ( https://gem5-review.googlesource.com/c/public/gem5/+/14976 )

Change subject: base, systemc: Fix clang compilation
......................................................................

base, systemc: Fix clang compilation

This patch is fixing the following issues:

- base: typename should be used only for types
- systemc: 'GCC_VERSION' is not defined for clang

Change-Id: I27c94445d65691a08a0a14a0ffe6b6942f6c455f
Signed-off-by: Giacomo Travaglini <[email protected]>
Reviewed-on: https://gem5-review.googlesource.com/c/14976
Reviewed-by: Jason Lowe-Power <[email protected]>
Maintainer: Gabe Black <[email protected]>
---
M src/base/circular_queue.hh
M src/systemc/SConscript
2 files changed, 4 insertions(+), 2 deletions(-)

Approvals:
  Jason Lowe-Power: Looks good to me, approved
  Gabe Black: Looks good to me, approved



diff --git a/src/base/circular_queue.hh b/src/base/circular_queue.hh
index ff7f73d..5023661 100644
--- a/src/base/circular_queue.hh
+++ b/src/base/circular_queue.hh
@@ -394,7 +394,7 @@
     };

   public:
-    using typename Base::operator[];
+    using Base::operator[];

     explicit CircularQueue(uint32_t size = 0)
         : _capacity(size), _head(1), _tail(0), _empty(true), _round(0)
diff --git a/src/systemc/SConscript b/src/systemc/SConscript
index 694ee56..7317b3a 100644
--- a/src/systemc/SConscript
+++ b/src/systemc/SConscript
@@ -31,7 +31,9 @@
 from m5.util.terminal import termcap

 if env['USE_SYSTEMC']:
-    if compareVersions(env['GCC_VERSION'], '5.0') < 0:
+    if 'GCC_VERSION' in env and \
+        compareVersions(env['GCC_VERSION'], '5.0') < 0:
+
         print(termcap.Yellow + termcap.Bold +
'Warning: Disabling systemc on gcc versions less than 5.0.' +
                 termcap.Normal)

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/14976
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: I27c94445d65691a08a0a14a0ffe6b6942f6c455f
Gerrit-Change-Number: 14976
Gerrit-PatchSet: 2
Gerrit-Owner: Giacomo Travaglini <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Giacomo Travaglini <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to