From c476ad8f74bb2389588cb9454c0b80b27f153707 Mon Sep 17 00:00:00 2001 From: Stephen Adams Date: Fri, 23 Jun 1995 12:18:32 +0000 Subject: [PATCH] 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. --- v7/src/sf/cgen.scm | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) 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) -- 2.25.1