Skip to content

Commit

Permalink
FIXME: #4905 – mark what needs to be changed after it's fixed.
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanKarpinski committed Nov 23, 2013
1 parent a43e32c commit 79dad36
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions base/int.jl
Original file line number Diff line number Diff line change
Expand Up @@ -576,22 +576,22 @@ end

## checked +, - and *

for T in (Int8,Int16,Int32,Int64)#,Int128)
for T in (Int8,Int16,Int32,Int64)#,Int128) ## FIXME: #4905
@eval begin
checked_add(x::$T, y::$T) = box($T,checked_sadd(unbox($T,x),unbox($T,y)))
checked_sub(x::$T, y::$T) = box($T,checked_ssub(unbox($T,x),unbox($T,y)))
checked_mul(x::$T, y::$T) = box($T,checked_smul(unbox($T,x),unbox($T,y)))
end
end
for T in (Uint8,Uint16,Uint32,Uint64)#,Uint128)
for T in (Uint8,Uint16,Uint32,Uint64)#,Uint128) ## FIXME: #4905
@eval begin
checked_add(x::$T, y::$T) = box($T,checked_uadd(unbox($T,x),unbox($T,y)))
checked_sub(x::$T, y::$T) = box($T,checked_usub(unbox($T,x),unbox($T,y)))
checked_mul(x::$T, y::$T) = box($T,checked_umul(unbox($T,x),unbox($T,y)))
end
end

# checked mul is broken for 8-bit types (LLVM bug?)
# checked mul is broken for 8-bit types (LLVM bug?) ## FIXME: #4905

for T in (Int8,Uint8)
@eval function checked_mul(x::$T, y::$T)
Expand All @@ -602,7 +602,7 @@ for T in (Int8,Uint8)
end
end

# checked ops are broken for 128-bit types (LLVM bug)
# checked ops are broken for 128-bit types (LLVM bug) ## FIXME: #4905

checked_add(x::Int128, y::Int128) = x + y
checked_sub(x::Int128, y::Int128) = x - y
Expand Down
2 changes: 1 addition & 1 deletion test/strings.jl
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ parsehex(s) = parseint(s,16)
@test parseint("-0o1234") == -int(0o1234)
@test parseint("-0b1011") == -int(0b1011)

for T in (Int8,Uint8,Int16,Uint16,Int32,Uint32,Int64,Uint64)#,Int128,Uint128)
for T in (Int8,Uint8,Int16,Uint16,Int32,Uint32,Int64,Uint64)#,Int128,Uint128) ## FIXME: #4905
@test parseint(T,string(typemin(T))) == typemin(T)
@test parseint(T,string(typemax(T))) == typemax(T)
@test_throws parseint(T,string(big(typemin(T))-1))
Expand Down

0 comments on commit 79dad36

Please sign in to comment.