Subject: bug#8033: 24.0.50; Number type error in byte compiler

From: Chong Yidong <[email-masked]>
Date: Mon, 14 Feb 2011 00:43:03 -0500

I originally reported this as a Gnus bug, but turns out it's a bug in
the byte compiler.  To reproduce, create a file with the following
contents:

  (defvar foo 1.0)

  (defun foo ()
    (interactive)
    (if (and (equal foo 1.0)
             (equal foo 1))
        (error "Object is `equal' to both a float and an integer")))

Then, in the shell:

~ $ emacs -Q -batch -f batch-byte-compile foo.el
~ $ emacs -Q -batch -l foo.elc -f foo
Object is `equal' to both a float and an integer

The error does not show up in Emacs 23.x, so it must have been
introduced relatively recently on the trunk.

In GNU Emacs 24.0.50.6 (x86_64-unknown-linux-gnu, GTK+ Version 2.20.1)
 of 2011-02-14 on furball
Windowing system distributor `The X.Org Foundation', version 11.0.10706000
configured using `configure  'CC=gcc' 'CFLAGS=-g''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.utf8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t