GNU bug report logs - #17807
24.4.50; hif-string-to-number convert a hex(or any non-decial) integer as float

Previous Next

Package: emacs;

Reported by: William Xu <william.xwl <at> gmail.com>

Date: Thu, 19 Jun 2014 06:28:02 UTC

Severity: normal

Found in version 24.4.50

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: William Xu <william.xwl <at> gmail.com>
Subject: bug#17807: closed (Re: bug#17807: 24.4.50; hif-string-to-number
 convert a hex(or any non-decial) integer as float)
Date: Thu, 19 Jun 2014 21:10:04 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#17807: 24.4.50; hif-string-to-number convert a hex(or any non-decial) integer as float

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 17807 <at> debbugs.gnu.org.

-- 
17807: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17807
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: William Xu <william.xwl <at> gmail.com>
Cc: 17807-done <at> debbugs.gnu.org
Subject: Re: bug#17807: 24.4.50;
 hif-string-to-number convert a hex(or any non-decial) integer as float
Date: Thu, 19 Jun 2014 17:09:13 -0400
> (hif-string-to-number "0F" 16)
>         => 15.0
[...]
> Anyway, how about attached fix?

Thanks, installed into trunk,


        Stefan

[Message part 3 (message/rfc822, inline)]
From: William Xu <william.xwl <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.4.50; hif-string-to-number convert a hex(or any non-decial)
 integer as float
Date: Thu, 19 Jun 2014 14:26:59 +0800
[Message part 4 (text/plain, inline)]
(hif-string-to-number "0F" 16)
        => 15.0

It would fail hif-logand, like the one below, caught in cedet.

Is it really necessary to support non-decial floats? When is something
like "0xff.e9" useful?

Anyway, how about attached fix?

---------------------------------8<-------------------------------------
Debugger entered--Lisp error: (wrong-type-argument integer-or-marker-p 15.0)
  logand(0 15.0)
  hif-logand(0 15.0)
  (hif-notequal (hif-logand (hif-lookup (quote SPURIOUS_APIC_VECTOR)) 15.0)
15.0)
  eval((hif-notequal (hif-logand (hif-lookup (quote SPURIOUS_APIC_VECTOR))
15.0) 15.0))
  semantic-c-do-lex-if()
  semantic-c-lexer(1 4938 nil nil)
  semantic-lex(1 4938 nil)
  semantic-parse-region-default(1 4938 nil nil nil)
  semantic-parse-region-c-mode(1 4938 nil nil nil)
  semantic-parse-region(1 4938)
  semantic-fetch-tags()
  byte-code("\212\212\300 \210*\301\207" [semantic-fetch-tags nil] 1)
  semantic-idle-scheduler-refresh-tags()
  (and (semantic-idle-scheduler-enabled-p)
(semantic-idle-scheduler-refresh-tags))
  ...
---------------------------------8<-------------------------------------

In GNU Emacs 24.4.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.12.2)
 of 2014-06-10 on linux-xwl
Windowing system distributor `The X.Org Foundation', version 11.0.11501000
System Description:    Debian GNU/Linux unstable (sid)

Configured using:
 `configure --with-x-toolkit=gtk3'

-- 
William

http://xwl.appspot.com
[Message part 5 (text/html, inline)]
[0001-Convert-non-decimal-integer-string-still-as-an-integ.patch (text/x-patch, attachment)]

This bug report was last modified 11 years and 34 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.