On Tue, Nov 8, 2016 at 12:50 AM, Ian Romanick <i...@freedesktop.org> wrote:
> -   virtual void visit_field(const glsl_type *type, const char *name,
> -                            bool row_major)
> +   virtual void visit_field(const glsl_type *, const char *,
> +                            bool /* row_major */)
>     {
> -      (void) type;
> -      (void) name;
> -      (void) row_major;
> -      assert(!"Should not get here.");
> +      unreachable("Should not get here.");
>     }

I'd be in favor of leaving this as an assert. The unreachable gets you
nothing here, except potential infinite loops on production builds
should this path ever get hit somehow.

I think people have started going overboard with unreachable... it
really should be for "shut up compiler, this can't happen, you're just
too dumb to see it" cases. Not for "it would be a bug to hit this
path" cases.

  -ilia
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to