emacs-bug-tracker
[Top][All Lists]
Advanced

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

[debbugs-tracker] bug#31474: closed (logxor+ash trigger compilation bug?


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#31474: closed (logxor+ash trigger compilation bug?)
Date: Mon, 11 Jun 2018 14:30:02 +0000

Your message dated Mon, 11 Jun 2018 10:28:28 -0400
with message-id <address@hidden>
and subject line Re: bug#31474: logxor+ash trigger compilation bug?
has caused the debbugs.gnu.org bug report #31474,
regarding logxor+ash trigger compilation bug?
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
31474: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=31474
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: logxor+ash trigger compilation bug? Date: Wed, 16 May 2018 20:16:31 +0200
Hi!

Trying to implement bit-fields for MesCC, I stumble upon this.  I was
looking for a bitwise left shift that introduces 1's instead of zeros.

This code

--8<---------------cut here---------------start------------->8---
;; foo.scm
(let* ((set-mask (pk 'set-mask (ash 3 3)))
       (clear-mask (pk 'clear-mask (logxor set-mask -1))))
  (pk 'expected (logxor 24 -1))
  (display clear-mask)
  (newline)
  clear-mask)
--8<---------------cut here---------------end--------------->8---

behaves as I expect when compilation is turned off (compile or
auto-compile behave alike for me)

--8<---------------cut here---------------start------------->8---
19:50:43 address@hidden:~/src/mes 
$ guile --no-auto-compile foo.scm

;;; (set-mask 24)

;;; (clear-mask -25)

;;; (expected -25)
-25
--8<---------------cut here---------------end--------------->8---

but when (auto)compiled, look:

--8<---------------cut here---------------start------------->8---
19:50:47 address@hidden:~/src/mes 
$ guile foo.scm
;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
;;;       or pass the --no-auto-compile argument to disable.
;;; compiling /home/janneke/src/mes/foo.scm
;;; compiled 
/home/janneke/.cache/guile/ccache/2.2-LE-8-3.A/home/janneke/src/mes/foo.scm.go

;;; (set-mask 24)

;;; (clear-mask -1)

;;; (expected -25)
-1
--8<---------------cut here---------------end--------------->8---

I'm using guile-2.2.3 from Guix master.

Is this a bug, can you suggest a workaround?

Greetings,
janneke

-- 
Jan Nieuwenhuizen <address@hidden> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | AvatarĀ® http://AvatarAcademy.com



--- End Message ---
--- Begin Message --- Subject: Re: bug#31474: logxor+ash trigger compilation bug? Date: Mon, 11 Jun 2018 10:28:28 -0400 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)
Jan Nieuwenhuizen <address@hidden> writes:

> Mark H Weaver writes:
>
>> Here's an improved version of my patch.  It's functionally equivalent
>> but with more comprehensible code and more comments.  I think this is
>> ready to push to the stable-2.2 branch.  Comments and suggestions
>> welcome.
>
> I tried it and it works for me.  Thanks a lot!
>
> Also, thanks for the workarounds you suggested, they indeed work without
> this patch.

I pushed the patch as commit 2733e97395db30c6233f79f341959e722b4bd4ff to
the stable-2.2 branch.  I'm closing this bug now, but feel free to
reopen if needed.

     Thanks,
       Mark


--- End Message ---

reply via email to

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