From 806a1144ceea710cb6586fc2a80ae60a6e0be552 Mon Sep 17 00:00:00 2001 From: Andreas Hansson Date: Fri, 14 Sep 2012 12:13:18 -0400 Subject: scons: Use c++0x with gcc >= 4.4 instead of 4.6 This patch shifts the version of gcc for which we enable c++0x from 4.6 to 4.4 The more long term plan is to see what the c++0x features can bring and what level of support would be enabled simply by bumping the required version of gcc from 4.3 to 4.4. A few minor things had to be fixed in the code base, most notably the choice of a hashmap implementation. In the Ruby Sequencer there were also a few minor issues that gcc 4.4 was not too happy about. --- src/mem/ruby/system/Sequencer.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/mem/ruby/system/Sequencer.cc') diff --git a/src/mem/ruby/system/Sequencer.cc b/src/mem/ruby/system/Sequencer.cc index efb0b002e..854d360ac 100644 --- a/src/mem/ruby/system/Sequencer.cc +++ b/src/mem/ruby/system/Sequencer.cc @@ -214,6 +214,11 @@ Sequencer::insertRequest(PacketPtr pkt, RubyRequestType request_type) Address line_addr(pkt->getAddr()); line_addr.makeLineAddress(); + // Create a default entry, mapping the address to NULL, the cast is + // there to make gcc 4.4 happy + RequestTable::value_type default_entry(line_addr, + (SequencerRequest*) NULL); + if ((request_type == RubyRequestType_ST) || (request_type == RubyRequestType_RMW_Read) || (request_type == RubyRequestType_RMW_Write) || @@ -231,7 +236,7 @@ Sequencer::insertRequest(PacketPtr pkt, RubyRequestType request_type) } pair r = - m_writeRequestTable.insert(RequestTable::value_type(line_addr, 0)); + m_writeRequestTable.insert(default_entry); if (r.second) { RequestTable::iterator i = r.first; i->second = new SequencerRequest(pkt, request_type, @@ -251,7 +256,7 @@ Sequencer::insertRequest(PacketPtr pkt, RubyRequestType request_type) } pair r = - m_readRequestTable.insert(RequestTable::value_type(line_addr, 0)); + m_readRequestTable.insert(default_entry); if (r.second) { RequestTable::iterator i = r.first; -- cgit v1.2.3