From: Cyrus H. <ch...@bo...> - 2005-10-26 22:32:34
|
Dear sbcl-devel, A while back I suggested making it merely a warning, rather than an error, for an sb-alien:enum to use a value more than once. Thankfully, this patch was accepted. However, I don't think I went quite far enough. I've finally gotten around to properly automating the generation of the file containing the offending enum code and working this into my asdf file so that this gets compiled automatically. In this setting the warning is enough to drop me into the debugger. Yes, I could catch the warning, but it would seem better to just issue a style-warning, or perhaps no warning at all for this instance. I know this is a rather trivial change, and my apologies for essentially fixing the same thing twice, but I think it's the right thing to. Thanks for considering this patch. Cyrus Index: sbcl/src/code/host-alieneval.lisp =================================================================== RCS file: /cvsroot/sbcl/sbcl/src/code/host-alieneval.lisp,v retrieving revision 1.38 diff -u -r1.38 host-alieneval.lisp --- sbcl/src/code/host-alieneval.lisp 15 Oct 2005 13:32:32 -0000 1.38 +++ sbcl/src/code/host-alieneval.lisp 26 Oct 2005 22:14:06 -0000 @@ -656,7 +656,7 @@ (unless (and max (> max val)) (setq max val)) (unless (and min (< min val)) (setq min val)) (when (rassoc val from-alist) - (warn "The element value ~S is used more than once." val)) + (style-warn "The element value ~S is used more than once." val)) (when (assoc sym from-alist :test #'eq) (error "The enumeration element ~S is used more than once." sym)) (push (cons sym val) from-alist))) |