From: Stephen Adams Date: Fri, 23 Jun 1995 12:41:35 +0000 (+0000) Subject: Added warnings for unused declarations. X-Git-Tag: 20090517-FFI~6241 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=717c036bedadca11d611c1168720a5d5cad88061;p=mit-scheme.git Added warnings for unused declarations. --- diff --git a/v8/src/compiler/midend/rtlgen.scm b/v8/src/compiler/midend/rtlgen.scm index 213eb7599..8ad1352f1 100644 --- a/v8/src/compiler/midend/rtlgen.scm +++ b/v8/src/compiler/midend/rtlgen.scm @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Id: rtlgen.scm,v 1.28 1995/05/14 00:52:41 adams Exp $ +$Id: rtlgen.scm,v 1.29 1995/06/23 12:41:35 adams Exp $ -Copyright (c) 1994 Massachusetts Institute of Technology +Copyright (c) 1994-1995 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -615,6 +615,7 @@ MIT in each case. |# body) (define (rtlgen/wrap-with-interrupt-check/procedure external? body desc) + external? ;ignored (rtlgen/wrap-with-intrpt-check ;; This change is required since the internal procedures are being ;; compiled as external procedures (trivial closures) at the @@ -1380,6 +1381,7 @@ MIT in each case. |# (cond ((not (pair? form)) (illegal-action)) ((DECLARE/? form) + (rtlgen/check-declarations (declare/declarations form)) false) (else (rtlgen/expr (rtlgen/state/->expr state '(NONE)) form)))) @@ -4362,6 +4364,17 @@ MIT in each case. |# (like? 'next-) (like? 'receiver-))) +(define (rtlgen/check-declarations declarations) + (define (check-declaration declaration) + (if (and (pair? declaration) + (memq (car declaration) *rtlgen/valid-remaining-declarations*)) + unspecific + (user-warning "Unused declaration" declaration))) + (for-each check-declaration declarations)) + +(define *rtlgen/valid-remaining-declarations* + '()) + #| ;; New RTL: