From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Engster Newsgroups: gmane.emacs.bugs Subject: bug#17681: 24.3.91; "Arithmetic Error" in hide-ifdef mode when using shift operators Date: Tue, 03 Jun 2014 21:12:33 +0200 Message-ID: <87zjhtn6xq.fsf@engster.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1401822868 9319 80.91.229.3 (3 Jun 2014 19:14:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 3 Jun 2014 19:14:28 +0000 (UTC) To: 17681@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jun 03 21:14:22 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WruAA-0003N2-57 for geb-bug-gnu-emacs@m.gmane.org; Tue, 03 Jun 2014 21:14:22 +0200 Original-Received: from localhost ([::1]:55532 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WruA9-0005nS-IV for geb-bug-gnu-emacs@m.gmane.org; Tue, 03 Jun 2014 15:14:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55882) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wru9y-0005kx-VA for bug-gnu-emacs@gnu.org; Tue, 03 Jun 2014 15:14:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wru9q-00071o-Ql for bug-gnu-emacs@gnu.org; Tue, 03 Jun 2014 15:14:10 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:43735) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wru9q-00071k-O3 for bug-gnu-emacs@gnu.org; Tue, 03 Jun 2014 15:14:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Wru9q-0007p4-Ad for bug-gnu-emacs@gnu.org; Tue, 03 Jun 2014 15:14:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: David Engster Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 03 Jun 2014 19:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 17681 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.140182279329973 (code B ref -1); Tue, 03 Jun 2014 19:14:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 3 Jun 2014 19:13:13 +0000 Original-Received: from localhost ([127.0.0.1]:42612 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wru92-0007nN-O5 for submit@debbugs.gnu.org; Tue, 03 Jun 2014 15:13:13 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:53832) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wru8z-0007mv-P3 for submit@debbugs.gnu.org; Tue, 03 Jun 2014 15:13:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wru8n-0006ow-PO for submit@debbugs.gnu.org; Tue, 03 Jun 2014 15:13:04 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:36119) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wru8n-0006os-Ma for submit@debbugs.gnu.org; Tue, 03 Jun 2014 15:12:57 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55518) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wru8h-0005aH-KL for bug-gnu-emacs@gnu.org; Tue, 03 Jun 2014 15:12:57 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wru8b-0006my-HW for bug-gnu-emacs@gnu.org; Tue, 03 Jun 2014 15:12:51 -0400 Original-Received: from randomsample.de ([5.45.97.173]:54648) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wru8b-0006lZ-8B for bug-gnu-emacs@gnu.org; Tue, 03 Jun 2014 15:12:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=randomsample.de; s=a; h=Content-Type:MIME-Version:Message-ID:Date:Subject:To:From; bh=2taozh2pmn14WA5n/Ag6TeCyobYu60ao9hWmaPFF8k0=; b=jlDxnQi/pdZY62e5ezwVn8JFqFCCFRF3lG8ChtQrJFp5VHygbgyfJ0kuiTPvn52wkNBny27s7/pJl+Z2/IGgeBWUUu00yyFdByjRgOrjbNHJyAayzyShshsD7YlX0oQF; Original-Received: from dslc-082-083-039-000.pools.arcor-ip.net ([82.83.39.0] helo=spaten) by randomsample.de with esmtpsa (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1Wru8U-0002wx-85 for bug-gnu-emacs@gnu.org; Tue, 03 Jun 2014 21:12:38 +0200 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:89949 Archived-At: Recipe: - Create a file "test.h" containing the following (this is from the file 'jiffies.h' in the Linux kernel): #if !((((NSEC_PER_SEC << 2) / TICK_NSEC) << (SEC_JIFFIE_SC - 2)) & 0x80000000) #endif - emacs -Q - Load the file, activate hide-ifdef-mode - C-c @ h (hide-ifdefs) The minibuffer will show "Arithmetic Error". Here is the backtrace: Debugger entered--Lisp error: (arith-error) hif-divide(0 nil) (hif-shiftleft (hif-divide (hif-shiftleft (hif-lookup (quote NSEC_PER_SEC)) 2) (hif-lookup (quote TICK_NSEC))) (hif-minus (hif-lookup (quote SEC_JIFFIE_SC)) 2)) (hif-logand (hif-shiftleft (hif-divide (hif-shiftleft (hif-lookup (quote NSEC_PER_SEC)) 2) (hif-lookup (quote TICK_NSEC))) (hif-minus (hif-lookup (quote SEC_JIFFIE_SC)) 2)) 2147483648.0) (hif-not (hif-logand (hif-shiftleft (hif-divide (hif-shiftleft (hif-lookup (quote NSEC_PER_SEC)) 2) (hif-lookup (quote TICK_NSEC))) (hif-minus (hif-lookup (quote SEC_JIFFIE_SC)) 2)) 2147483648.0)) eval((hif-not (hif-logand (hif-shiftleft (hif-divide (hif-shiftleft (hif-lookup (quote NSEC_PER_SEC)) 2) (hif-lookup (quote TICK_NSEC))) (hif-minus (hif-lookup (quote SEC_JIFFIE_SC)) 2)) 2147483648.0))) hif-possibly-hide() hide-ifdef-guts() hide-ifdefs() Earlier Emacsen did not throw an error here (although it is very possible that the above line wasn't calculated correctly). Still, this probably qualifies as a regression. -David