diff options
author | Andrea Corallo <akrl@sdf.org> | 2020-01-01 22:02:49 +0100 |
---|---|---|
committer | Andrea Corallo <akrl@sdf.org> | 2020-01-03 17:47:09 +0100 |
commit | 5a228fefb6f1d1932f452693ded660cd903f457d (patch) | |
tree | 7c9bb42cebcbd1ea8d62c1c1c2f4d7e05f47b0f8 /lisp/emacs-lisp | |
parent | 2239cc81b72e0c066d83271f5c9b4d8097b1ce0d (diff) | |
download | emacs-5a228fefb6f1d1932f452693ded660cd903f457d.tar.gz emacs-5a228fefb6f1d1932f452693ded660cd903f457d.tar.bz2 emacs-5a228fefb6f1d1932f452693ded660cd903f457d.zip |
Prevent false warning emission
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/comp.el | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index de3b28e438c..77d47bde8a8 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el @@ -1551,15 +1551,15 @@ This can run just once." "Given INSN when F is pure if all ARGS are known remove the function call." (when (and (get f 'pure) ; Can we just optimize pure here? See byte-opt.el (cl-every #'comp-mvar-const-vld args)) - (condition-case err - (let ((val (apply f (mapcar #'comp-mvar-constant args)))) - ;; See `comp-emit-set-const'. - (setf (car insn) 'setimm - (cddr insn) (list (comp-add-const-to-relocs val) val))) - ;; FIXME Should we crash? At least we should complain once. - (t (message "Native compiler trying to move run-time error into \ -compile-time? %S calling %S inside function %S." err f -(comp-func-name comp-func)))))) + (ignore-errors + ;; No point to complain here because we should do basic block + ;; pruning in order to be sure that this is not dead-code. This + ;; is now left to gcc, to be implemented only if we want a + ;; reliable diagnostic here. + (let ((val (apply f (mapcar #'comp-mvar-constant args)))) + ;; See `comp-emit-set-const'. + (setf (car insn) 'setimm + (cddr insn) (list (comp-add-const-to-relocs val) val)))))) (defun comp-propagate-insn (insn) "Propagate within INSN." |