emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 35bf8d4a02: Merge from origin/emacs-28


From: Stefan Kangas
Subject: master 35bf8d4a02: Merge from origin/emacs-28
Date: Thu, 10 Feb 2022 00:56:29 -0500 (EST)

branch: master
commit 35bf8d4a025baa8da2affa3cff5a0f426889096f
Merge: aad91285c3 69e82968d7
Author: Stefan Kangas <stefan@marxist.se>
Commit: Stefan Kangas <stefan@marxist.se>

    Merge from origin/emacs-28
    
    69e82968d7 Fix integer arithmetic miss-compilation (bug#53451)
    31af9bca99 Mark flymake as compatible with emacs-26.1
---
 lisp/emacs-lisp/comp-cstr.el | 26 ++++++++++++++------------
 lisp/progmodes/flymake.el    |  4 ++--
 test/src/comp-tests.el       |  9 ++++++++-
 3 files changed, 24 insertions(+), 15 deletions(-)

diff --git a/lisp/emacs-lisp/comp-cstr.el b/lisp/emacs-lisp/comp-cstr.el
index ad956dabd8..9eaf38067f 100644
--- a/lisp/emacs-lisp/comp-cstr.el
+++ b/lisp/emacs-lisp/comp-cstr.el
@@ -454,18 +454,20 @@ Return them as multiple value."
   (declare (debug (range-body))
            (indent defun))
   `(with-comp-cstr-accessors
-     (when-let ((r1 (range ,src1))
-                (r2 (range ,src2)))
-       (let* ((l1 (comp-cstr-smallest-in-range r1))
-              (l2 (comp-cstr-smallest-in-range r2))
-              (h1 (comp-cstr-greatest-in-range r1))
-              (h2 (comp-cstr-greatest-in-range r2)))
-         (setf (typeset ,dst) (when (cl-some (lambda (x)
-                                               (comp-subtype-p 'float x))
-                                             (append (typeset src1)
-                                                     (typeset src2)))
-                                '(float))
-               (range ,dst) ,@range-body)))))
+     (if (or (neg src1) (neg src2))
+         (setf (typeset ,dst) '(number))
+       (when-let ((r1 (range ,src1))
+                  (r2 (range ,src2)))
+         (let* ((l1 (comp-cstr-smallest-in-range r1))
+                (l2 (comp-cstr-smallest-in-range r2))
+                (h1 (comp-cstr-greatest-in-range r1))
+                (h2 (comp-cstr-greatest-in-range r2)))
+           (setf (typeset ,dst) (when (cl-some (lambda (x)
+                                                 (comp-subtype-p 'float x))
+                                               (append (typeset src1)
+                                                       (typeset src2)))
+                                  '(float))
+                 (range ,dst) ,@range-body))))))
 
 (defun comp-cstr-add-2 (dst src1 src2)
   "Sum SRC1 and SRC2 into DST."
diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
index e369cb1f21..83d7bc8641 100644
--- a/lisp/progmodes/flymake.el
+++ b/lisp/progmodes/flymake.el
@@ -4,9 +4,9 @@
 
 ;; Author: Pavel Kobyakov <pk_at_work@yahoo.com>
 ;; Maintainer: João Távora <joaotavora@gmail.com>
-;; Version: 1.2.1
+;; Version: 1.2.2
 ;; Keywords: c languages tools
-;; Package-Requires: ((emacs "28.1") (eldoc "1.1.0") (project "0.7.1"))
+;; Package-Requires: ((emacs "26.1") (eldoc "1.1.0") (project "0.7.1"))
 
 ;; This is a GNU ELPA :core package.  Avoid functionality that is not
 ;; compatible with the version of Emacs recorded above.
diff --git a/test/src/comp-tests.el b/test/src/comp-tests.el
index 89cb3d153d..212d9e999f 100644
--- a/test/src/comp-tests.el
+++ b/test/src/comp-tests.el
@@ -1369,7 +1369,14 @@ Return a list of results."
          (when (eql x 1.0)
           (error ""))
          x)
-       t)))
+       t)
+
+      ;; 74
+      ((defun comp-tests-ret-type-spec-f (x)
+         (if (eq x 0)
+            (error "")
+          (1+ x)))
+       number)))
 
   (defun comp-tests-define-type-spec-test (number x)
     `(comp-deftest ,(intern (format "ret-type-spec-%d" number)) ()



reply via email to

[Prev in Thread] Current Thread [Next in Thread]