X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fparse-lambda-list.lisp;h=affb94d95dd0bb0b4506bb89292f2b53dfc34bcf;hb=95591ed483dbb8c0846c129953acac1554f28809;hp=7f60223f26fea39780baf93adbe85d48e0761631;hpb=c6ca3162c8abd6ae9cce613f5df5778405806e60;p=sbcl.git diff --git a/src/compiler/parse-lambda-list.lisp b/src/compiler/parse-lambda-list.lisp index 7f60223..affb94d 100644 --- a/src/compiler/parse-lambda-list.lisp +++ b/src/compiler/parse-lambda-list.lisp @@ -34,7 +34,7 @@ ;;; arg specifiers are just passed through untouched. If something is ;;; wrong, we use COMPILER-ERROR, aborting compilation to the last ;;; recovery point. -(declaim (ftype (sfunction (list) +(declaim (ftype (sfunction (list &key (:silent boolean)) (values list list boolean t boolean list boolean boolean list boolean t t boolean)) parse-lambda-list-like-thing)) @@ -42,7 +42,7 @@ (values list list boolean t boolean list boolean boolean list boolean t t)) parse-lambda-list)) -(defun parse-lambda-list-like-thing (list) +(defun parse-lambda-list-like-thing (list &key silent) (collect ((required) (optional) (keys) @@ -86,8 +86,9 @@ (compiler-error "misplaced &KEY in lambda list: ~S" list)) #-sb-xc-host (when (optional) - (compiler-style-warn - "&OPTIONAL and &KEY found in the same lambda list: ~S" list)) + (unless silent + (compiler-style-warn + "&OPTIONAL and &KEY found in the same lambda list: ~S" list))) (setq keyp t state :key)) (&allow-other-keys @@ -126,8 +127,10 @@ (let ((name (symbol-name arg))) (when (and (plusp (length name)) (char= (char name 0) #\&)) - (style-warn - "suspicious variable in lambda list: ~S." arg)))) + ;; Should this be COMPILER-STYLE-WARN? + (unless silent + (style-warn + "suspicious variable in lambda list: ~S." arg))))) (case state (:required (required arg)) (:optional (optional arg))