On Tue, 29 Apr 2014, Andrew Bardsley wrote:
On April 29, 2014, 6:38 a.m., Nilay Vaish wrote:
Is it possible write some preprocessing macro that generates both the
enum and the quoted strings?
Andrew Bardsley wrote:
It would be desirable to keep enums and string representations in sync that
way, but it's more world-reorganisation than I feel this patch immediately
demands.
To make things a bit better I've changed the array into a switch statement
so that the order of the enumeration elements no longer matters, removed flags
will cause an error and added flags will at least fall back on printing their
int representations.
Ali Saidi wrote:
I'd prefer to leave it as is, but just put a static_assert in the code that
at least fails compilation if something is added in one but not both places.
To match the static_assert in arch/arm/faults.hh, presumably. Any thoughts,
Nilay?
I am fine with Ali's proposal.
--
Nilay
_______________________________________________
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev