Skip to content

Integer bit size and the modulus operator (PR#8541)

2 messages · Brian Ripley, Duncan Murdoch

#
On Mon, 30 Jan 2006 murdoch at stats.uwo.ca wrote:

            
You do get a warning, though.  It *is* allowed, see ?return.

One error is the following in real_binary:

     if (n1 > n2)
 	copyMostAttrib(s1, ans);
     else if (n1 == n2) {
 	copyMostAttrib(s2, ans);
 	copyMostAttrib(s1, ans);
     }
     else
 	copyMostAttrib(s2, ans);

Here ans is not PROTECTED.

The second is in the warning, which causes allocation when ans is not 
protected.

Fixed in R-devel and 2.2.1 patched.

  
    
#
On 1/30/2006 2:26 PM, ripley at stats.ox.ac.uk wrote:
I don't see it now.  Thanks!

Duncan Murdoch