diff --git a/src/cmp/cmpmain.lsp b/src/cmp/cmpmain.lsp index 2ff7cba39..9fc19afd7 100644 --- a/src/cmp/cmpmain.lsp +++ b/src/cmp/cmpmain.lsp @@ -217,6 +217,7 @@ the environment variable TMPDIR to a different value." template)) #+dlopen (defun bundle-cc (o-pathname init-name object-files) + (declare (ignore init-name)) (let ((ld-flags (split-program-options *ld-bundle-flags*)) (ld-libs (split-program-options *ld-libs*))) #+msvc @@ -236,7 +237,7 @@ the environment variable TMPDIR to a different value." template)) #+mingw32 (setf ld-flags (list* "-shared" "-Wl,--export-all-symbols" ld-flags)) (linker-cc o-pathname object-files :type :fasl - :ld-flags ld-flags :ld-libs ld-libs))) + :ld-flags ld-flags :ld-libs ld-libs))) (defconstant +lisp-program-header+ " #include @@ -637,7 +638,8 @@ output = si_safe_eval(2, ecl_read_from_cstring(lisp_code), ECL_NIL); (ext:*source-location* (cons source-truename 0)) (*suppress-compiler-messages* (or *suppress-compiler-messages* (not *compile-verbose*)))) - (declare (notinline compiler-cc)) + (declare (ignore output-file) + (notinline compiler-cc)) "Compiles the file specified by INPUT-PATHNAME and generates a fasl file specified by OUTPUT-FILE. If the filetype is not specified in INPUT-PATHNAME, then \".lsp\" is used as the default file type for the source file. LOAD diff --git a/src/cmp/cmpos-features.lsp b/src/cmp/cmpos-features.lsp index 397fded50..fab08074e 100644 --- a/src/cmp/cmpos-features.lsp +++ b/src/cmp/cmpos-features.lsp @@ -64,6 +64,7 @@ thereis (pathname-match-p base pattern-path))) (defun gather-keywords (strings patterns) + (declare (ignore patterns)) (let ((strings (reduce #'append (mapcar #'split-words strings)))) (mapcar (lambda (s) (intern (string-upcase s) (find-package :keyword))) diff --git a/src/cmp/cmppass1-cont.lsp b/src/cmp/cmppass1-cont.lsp index f86d4644f..31f12532e 100644 --- a/src/cmp/cmppass1-cont.lsp +++ b/src/cmp/cmppass1-cont.lsp @@ -128,21 +128,21 @@ ;; Split forms according to the tag they are preceded by and compile ;; them grouped by PROGN. This help us use the optimizations in ;; C1PROGN to recognize transfers of control. - (loop for form in body - with output = '() - with tag-body = nil - with this-tag = (make-var :name 'tagbody-beginnnig :kind nil) - do (cond ((tag-p form) - (when tag-body - (setf output (cons (c1progn (nreconc tag-body '(nil))) output) - tag-body nil)) - (push form output)) - (t - (push form tag-body))) - finally (setf body - (if tag-body - (cons (c1progn (nreconc tag-body '(nil))) output) - output))) + (make-var :name 'tagbody-beginnnig :kind nil) ; "this-tag" + (loop with output = '() + with tag-body = nil + for form in body + do (cond ((tag-p form) + (when tag-body + (setf output (cons (c1progn (nreconc tag-body '(nil))) output) + tag-body nil)) + (push form output)) + (t + (push form tag-body))) + finally (setf body + (if tag-body + (cons (c1progn (nreconc tag-body '(nil))) output) + output))) ;;; Reverse the body list, deleting unused tags. (loop for form in body diff --git a/src/cmp/cmppass2-call.lsp b/src/cmp/cmppass2-call.lsp index 12187275b..6b98066a9 100644 --- a/src/cmp/cmppass2-call.lsp +++ b/src/cmp/cmppass2-call.lsp @@ -255,6 +255,7 @@ (when fname (wt-comment fname)))) (defun wt-call-normal (fun args type) + (declare (ignore type)) (unless (fun-cfun fun) (baboon "Function without a C name: ~A" (fun-name fun))) (let* ((minarg (fun-minarg fun)) diff --git a/src/cmp/cmppass2-ffi.lsp b/src/cmp/cmppass2-ffi.lsp index b722fac2a..bb21e2f54 100644 --- a/src/cmp/cmppass2-ffi.lsp +++ b/src/cmp/cmppass2-ffi.lsp @@ -326,12 +326,13 @@ ;; (defun c2c-progn (c1form variables statements) + (declare (ignore c1form)) (loop with *destination* = 'TRASH for form in statements do (cond ((stringp form) (wt-nl) (wt-c-inline-loc :void form variables - t ; side effects + t ; side effects nil) ; no output variables ) (t @@ -445,6 +446,7 @@ `(COERCE-LOC ,rep-type ,loc))))) (defun wt-c-inline-loc (output-rep-type c-expression coerced-arguments side-effects output-vars) + (declare (ignore output-rep-type side-effects)) (with-input-from-string (s c-expression) (when (and output-vars (not (eq output-vars 'VALUES))) (wt-nl)) @@ -495,6 +497,7 @@ (defun t3-defcallback (lisp-name c-name c-name-constant return-type return-type-code arg-types arg-type-constants call-type &aux (return-p t)) + (declare (ignore lisp-name)) (when (eql return-type :void) (setf return-p nil)) (let ((return-type-name (rep-type->c-name (ffi::%convert-to-arg-type return-type))) diff --git a/src/cmp/cmppass2-loc.lsp b/src/cmp/cmppass2-loc.lsp index 8ec8ca84d..2f6d134f1 100644 --- a/src/cmp/cmppass2-loc.lsp +++ b/src/cmp/cmppass2-loc.lsp @@ -174,8 +174,10 @@ (wt "v" lcl)) (defun wt-lcl-loc (lcl &optional type name) - (unless (numberp lcl) (baboon :format-control "wt-lcl-loc: ~s NaN" - :format-arguments (list lcl))) + (declare (ignore type)) + (unless (numberp lcl) + (baboon :format-control "wt-lcl-loc: ~s NaN" + :format-arguments (list lcl))) (wt "v" lcl name)) (defun wt-temp (temp) diff --git a/src/cmp/cmppass2-special.lsp b/src/cmp/cmppass2-special.lsp index ec6809a70..35f364375 100644 --- a/src/cmp/cmppass2-special.lsp +++ b/src/cmp/cmppass2-special.lsp @@ -19,7 +19,7 @@ (progv symbols values (c2expr body))) (defun c2function (c1form kind funob fun) - (declare (ignore c1form)) + (declare (ignore c1form funob)) (case kind (GLOBAL (unwind-exit (list 'FDEFINITION fun))) @@ -37,12 +37,11 @@ (CLOSURE (setf (fun-level fun) 0 (fun-env fun) *env*)) (LEXICAL - (let ((parent (fun-parent fun))) - ;; Only increase the lexical level if there have been some - ;; new variables created. This way, the same lexical environment - ;; can be propagated through nested FLET/LABELS. - (setf (fun-level fun) (if (plusp *lex*) (1+ *level*) *level*) - (fun-env fun) 0))) + ;; Only increase the lexical level if there have been some + ;; new variables created. This way, the same lexical environment + ;; can be propagated through nested FLET/LABELS. + (setf (fun-level fun) (if (plusp *lex*) (1+ *level*) *level*) + (fun-env fun) 0)) (otherwise (setf (fun-env fun) 0 (fun-level fun) 0))) (let ((previous diff --git a/src/cmp/cmppass2-top.lsp b/src/cmp/cmppass2-top.lsp index 334484a1b..c724d2200 100644 --- a/src/cmp/cmppass2-top.lsp +++ b/src/cmp/cmppass2-top.lsp @@ -236,7 +236,7 @@ (wt-label *exit*))) (defun t2init-form (c1form vv-loc form) - (declare (ignore c1form)) + (declare (ignore c1form vv-loc)) (let* ((*exit* (next-label)) (*unwind-exit* (list *exit*)) (*destination* 'TRASH)) (c2expr form) @@ -473,9 +473,11 @@ (format stream "~%};"))))) (defun t2fset (c1form &rest args) + (declare (ignore args)) (t2ordinary nil c1form)) (defun c2fset (c1form fun fname macro pprint c1forms) + (declare (ignore pprint)) (when (fun-no-entry fun) (wt-nl "(void)0; /* No entry created for " (format nil "~A" (fun-name fun)) diff --git a/src/cmp/cmppass2-var.lsp b/src/cmp/cmppass2-var.lsp index 90ea49af4..67416d224 100644 --- a/src/cmp/cmppass2-var.lsp +++ b/src/cmp/cmppass2-var.lsp @@ -97,6 +97,7 @@ (nr (make-lcl-var :type :int)) (*inline-blocks* 0) min-values max-values) + (declare (ignore nr)) ;; 1) Retrieve the number of output values (multiple-value-setq (min-values max-values) (c1form-values-number init-form)) @@ -300,6 +301,7 @@ ;; many they are. (multiple-value-bind (min-values max-values) (c1form-values-number form) + (declare (ignore max-values)) ;; We save the values in the value stack + value0 (let ((*destination* 'RETURN))