Subject: bug#25558: Spurious warnings with variables mentioned only pcase guard patterns

From: [email-masked]
Date: Fri, 27 Jan 2017 19:24:41 -0500

forcemerge 16771 25558
quit

Clément Pit--Claudel <[email-masked]> writes:

> The following causes a warning (unused variable 'b'):
>
>   (pcase '(1 2) ((and `(,a ,b) (guard (equal a b))) a))
>
> This is due to pcase let-binding 'a' twice; once around the guard test ('(equal a b)'), and once around the body ('a').

This was reported as #16771.  It seems difficult to fix, unfortunately.