clang: Fix recently introduced clang compilation errors
Review Request #1083 - Created March 6, 2012 and submitted
| Information | |
|---|---|
| Andreas Hansson | |
| gem5 | |
| default | |
| Reviewers | |
| Default | |
clang: Fix recently introduced clang compilation errors This patch makes the code compile with clang 2.9 and 3.0 again by making two very minor changes. Firt, it maintains a strict typing in the forward declaration of the BaseCPUParams. Second, it adds a FullSystemInt flag of the type unsigned int next to the boolean FullSystem flag. The FullSystemInt variable can be used in decode-statements (expands to switch statements) in the instruction decoder.
compile with clang 2.9/3.0 and gcc 4.5/4.6 and util/regress all passing (disregarding t1000 and eio)
Ship It!
Posted (March 9, 2012, 3:35 a.m.)
Did you consider my idea of changing the decoder to use "FullSystem ? 1 : 0" in the switch? It's not pretty but it is a more localized solution. If you considered it and rejected it, that's fine, just wanted to know...
Review request changed
Updated (March 9, 2012, 6:36 p.m.)
Description: |
|
||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 2 (+23 -9) |
Thanks, Andreas. Peronally I'd prefer to use a macro, since then you don't have two independent variables that really reflect the same thing. However, it sounds like Gabe has further changes in the pipeline, and if this is just a stopgap anyway then it's not worth quibbling about.
