chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-hackers] [PATCH] warn if var is bound multiple times in the


From: Peter Bex
Subject: Re: [Chicken-hackers] [PATCH] warn if var is bound multiple times in the same binding form
Date: Mon, 4 Feb 2013 21:53:32 +0100
User-agent: Mutt/1.4.2.3i

On Sun, Feb 03, 2013 at 11:33:09PM +0100, Felix wrote:
> From: Peter Bex <address@hidden>
> > 
> > Could you please generate a fresh patch against master?
> 
> Attached.

How about this slightly improved version?

The patch you posted warns multiple times per symbol seen.  Usually this
shouldn't be an issue, but consider a macro that erroneously generates
the same identifier many times.

Since it's the same name, it doesn't make much sense to warn more than
once.  The warning already says it's bound "multiple times".

Before:

#;1> (let ((a 1) (a 2) (a 3)) a)

Warning: variable bound multiple times in let construct
a
(let ((a 1) (a 2) (a 3)) a)

Warning: variable bound multiple times in let construct
a
(let ((a 1) (a 2) (a 3)) a)
1
#;2>


After:

#;1> (let ((a 1) (a 2) (a 3)) a)

Warning: variable bound multiple times in let construct
a
(let ((a 1) (a 2) (a 3)) a)
1
#;2>

Cheers,
Peter
-- 
http://sjamaan.ath.cx

Attachment: 0001-Warn-if-the-same-variable-is-bound-multiple-times-in.patch
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]