Franklin He has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/55664 )

Change subject: systemc: Fixed ctor ordering for sc_fifo.hh
......................................................................

systemc: Fixed ctor ordering for sc_fifo.hh

This fixes a constructor ordering issue and lets the
headers compile with `-Wreorder` enabled

Test: Compiled SystemC headers with `-Wreorder`
Change-Id: I88703b464f8940dd973c2102f1cd0da757b17985
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/55664
Reviewed-by: Gabe Black <[email protected]>
Maintainer: Gabe Black <[email protected]>
Reviewed-by: Matthias Jung <[email protected]>
Tested-by: kokoro <[email protected]>
---
M src/systemc/ext/channel/sc_fifo.hh
1 file changed, 24 insertions(+), 5 deletions(-)

Approvals:
  Matthias Jung: Looks good to me, approved
  Gabe Black: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass




diff --git a/src/systemc/ext/channel/sc_fifo.hh b/src/systemc/ext/channel/sc_fifo.hh
index 5d3dab4..2f0a4f4 100644
--- a/src/systemc/ext/channel/sc_fifo.hh
+++ b/src/systemc/ext/channel/sc_fifo.hh
@@ -53,15 +53,16 @@
     explicit sc_fifo(int size=16) :
             sc_fifo_in_if<T>(), sc_fifo_out_if<T>(),
             sc_prim_channel(sc_gen_unique_name("fifo")),
+            _reader(NULL), _writer(NULL),
             _size(size), _num_free(size), _num_available(0),
-            _readsHappened(false), _writesHappened(false),
-            _reader(NULL), _writer(NULL)
+            _readsHappened(false), _writesHappened(false)
     {}
     explicit sc_fifo(const char *name, int size=16) :
             sc_fifo_in_if<T>(), sc_fifo_out_if<T>(),
-            sc_prim_channel(name), _size(size), _num_free(size),
- _num_available(0), _readsHappened(false), _writesHappened(false),
-            _reader(NULL), _writer(NULL)
+            sc_prim_channel(name),
+            _reader(NULL), _writer(NULL),
+            _size(size), _num_free(size), _num_available(0),
+            _readsHappened(false), _writesHappened(false)
     {}
     virtual ~sc_fifo() {}


--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/55664
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: I88703b464f8940dd973c2102f1cd0da757b17985
Gerrit-Change-Number: 55664
Gerrit-PatchSet: 3
Gerrit-Owner: Franklin He <[email protected]>
Gerrit-Reviewer: Andreas Sandberg <[email protected]>
Gerrit-Reviewer: Franklin He <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Giacomo Travaglini <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: Matthias Jung <[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

Reply via email to