On Fri, Dec 09, 2016 at 12:52:03PM +0000, Richard Sandiford wrote:
> This patch renames enum machine_mode to enum machine_mode_enum
> and adds a machine_mode wrapper class.
> 
> The previous patch mechanically replaced mode names in case
> statements; this one updates other places that should continue
> to use the enum directly.
> 
> The patch continues to use enums for static variables.  This isn't
> necessary, but it cuts down on the amount of load-time initialisation
> and shouldn't have any downsides.

We should probably add a GCC_CONSTEXPR macro so we can get that
advantage without having to play games like this, but this case doesn't
seem like too big of a deal.

Trev

Reply via email to