From: Stephen Adams Date: Fri, 23 Jun 1995 12:18:32 +0000 (+0000) Subject: Added a list of declarations which are not handled by SF but are known X-Git-Tag: 20090517-FFI~6242 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=c476ad8f74bb2389588cb9454c0b80b27f153707;p=mit-scheme.git Added a list of declarations which are not handled by SF but are known to be handled by the compiler. This list is used only as a filter on the "Unused declaration" warning. --- diff --git a/v7/src/sf/cgen.scm b/v7/src/sf/cgen.scm index ff5502e69..7b7d2329a 100644 --- a/v7/src/sf/cgen.scm +++ b/v7/src/sf/cgen.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: cgen.scm,v 4.2 1993/08/03 03:09:44 gjr Exp $ +$Id: cgen.scm,v 4.3 1995/06/23 12:18:32 adams Exp $ Copyright (c) 1988-1993 Massachusetts Institute of Technology @@ -85,9 +85,18 @@ MIT in each case. |# ((declarations/known? (car declarations)) (loop (cdr declarations))) (else - (warn "Unused declaration" (car declarations)) + (if (not (known-compiler-declaration? (car declarations))) + (warn "Unused declaration" (car declarations))) (cons (car declarations) (loop (cdr declarations)))))) declarations)))) + +(define *known-compiler-declarations* + ;; Declarations which are not handled by SF but are known to be handled + ;; by the compiler so SF ignores then silently. + '(IGNORE-REFERENCE-TRAPS IGNORE-ASSIGNMENT-TRAPS)) + +(define (known-compiler-declaration? declaration) + (memq (car declaration) *known-compiler-declarations*)) (define (cgen/expressions interns expressions) (map (lambda (expression)