[Mesa-dev] [PATCH] intel/compiler: Explicitly cast register type in switch

Matt Turner mattst88 at gmail.com
Thu Mar 29 18:34:07 UTC 2018


On Thu, Mar 29, 2018 at 11:32 AM, Ian Romanick <idr at freedesktop.org> wrote:
> From: Ian Romanick <ian.d.romanick at intel.com>
>
> brw_reg::type is "enum brw_reg_type type:4".  For whatever reason, GCC
> is treating this as an int instead of an enum.  As a result, it doesn't
> detect missing switch cases and it doesn't detect that flow can get out
> of the switch.

Weird. That is not what I would have expected GCC to do.

Reviewed-by: Matt Turner <mattst88 at gmail.com>


More information about the mesa-dev mailing list