chicken-janitors
[Top][All Lists]
Advanced

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

Re: [Chicken-janitors] #823: arithmetic-shift fails in extreme cases (wa


From: Chicken Trac
Subject: Re: [Chicken-janitors] #823: arithmetic-shift fails in extreme cases (was: arithmetic-shift fails in exactly one edge case)
Date: Tue, 15 Oct 2013 18:52:37 -0000

#823: arithmetic-shift fails in extreme cases
-----------------------------+----------------------------------------------
  Reporter:  sjamaan         |       Owner:                                     
    
      Type:  defect          |      Status:  new                                
    
  Priority:  minor           |   Milestone:  4.9.0                              
    
 Component:  core libraries  |     Version:  4.7.x                              
    
Resolution:                  |    Keywords:  edge cases, numbers, shifting, 
overflow
-----------------------------+----------------------------------------------

Comment(by sjamaan):

 Turns out there's also a bug when shifting more than C_WORD_SIZE
 positions.

 According to the [http://std.dkuug.dk/JTC1/SC22/WG14/www/docs/n843.htm C
 spec], shifting more than the number of bits in the type is undefined (#3
 in section 6.5.7, "bitwise shift operators").
 Shifting negative values is also pretty ill-defined (#4 and #5, final
 sentence in both).

 C: Don't you just ''love'' it?

-- 
Ticket URL: <http://bugs.call-cc.org/ticket/823#comment:1>
Chicken Scheme <http://www.call-with-current-continuation.org/>
Chicken Scheme is a compiler for the Scheme programming language.

reply via email to

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