scons: Enforce gcc >= 4.4 or clang >= 2.9 and c++0x support
Review Request #1556 - Created Dec. 6, 2012 and submitted
| Information | |
|---|---|
| Ali Saidi | |
| gem5 | |
| default | |
| Reviewers | |
| Default | |
Changeset 9389:4233bdc81103 --------------------------- scons: Enforce gcc >= 4.4 or clang >= 2.9 and c++0x support This patch checks that the compiler in use is either gcc >= 4.4 or clang >= 2.9. and enables building with --std=c++0x in all cases. As a consequence, we can tidy up the hashmap and always have static_assert available. If anyone wants to use alternative compilers, icc for example supports c++0x to a similar level and could be added if needed. This patch opens up for a more elaborate use of c++0x features that are present in gcc 4.4 and clang 2.9, e.g. auto typed variables, variadic templates, rvalues and move semantics, and strongly typed enums. There will be no going back on this one...
Issue Summary
2
2
0
0
| Description | From | Last Updated | Status |
|---|---|---|---|
| What sorts of problems? | Nathan Binkert | Dec. 12, 2012, 12:06 p.m. | Open |
| The DynInstPtr is not fully defined by the time we create an STL container and typdef the iterator of it. ... | Andreas Hansson | Dec. 12, 2012, 5:36 p.m. | Open |
I think, in near term, this will be a source of trouble for users.
Posted (Dec. 12, 2012, 12:06 p.m.)
I'm in favor of this change, but this seems like something that should have some debate, or is there already general consensus? (Am I too late? :)
-
SConstruct (Diff revision 1) -
What sorts of problems?
Posted (Dec. 12, 2012, 5:36 p.m.)
-
SConstruct (Diff revision 1) -
The DynInstPtr is not fully defined by the time we create an STL container and typdef the iterator of it. The solution is to throw away the in-house ref-counting pointer and use shared_ptr as C++11 allows unique_ptr and shared_ptr as the only partially defined templated STL types. Using shared_ptr instead of the in-house ref counting also has other benefits.
