summaryrefslogtreecommitdiff
path: root/libgo/go/strconv/atoi.go
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2020-07-27 22:27:54 -0700
committerIan Lance Taylor <iant@golang.org>2020-08-01 11:21:40 -0700
commitf75af8c1464e948b5e166cf5ab09ebf0d82fc253 (patch)
tree3ba3299859b504bdeb477727471216bd094a0191 /libgo/go/strconv/atoi.go
parent75a23e59031fe673fc3b2e60fd1fe5f4c70ecb85 (diff)
downloadgcc-f75af8c1464e948b5e166cf5ab09ebf0d82fc253.tar.gz
libgo: update to go1.15rc1
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/245157
Diffstat (limited to 'libgo/go/strconv/atoi.go')
-rw-r--r--libgo/go/strconv/atoi.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/libgo/go/strconv/atoi.go b/libgo/go/strconv/atoi.go
index a4a8a37fb42..f6c4efaef60 100644
--- a/libgo/go/strconv/atoi.go
+++ b/libgo/go/strconv/atoi.go
@@ -22,7 +22,7 @@ var ErrSyntax = errors.New("invalid syntax")
// A NumError records a failed conversion.
type NumError struct {
- Func string // the failing function (ParseBool, ParseInt, ParseUint, ParseFloat)
+ Func string // the failing function (ParseBool, ParseInt, ParseUint, ParseFloat, ParseComplex)
Num string // the input
Err error // the reason the conversion failed (e.g. ErrRange, ErrSyntax, etc.)
}
@@ -96,7 +96,7 @@ func ParseUint(s string, base int, bitSize int) (uint64, error) {
}
if bitSize == 0 {
- bitSize = int(IntSize)
+ bitSize = IntSize
} else if bitSize < 0 || bitSize > 64 {
return 0, bitSizeError(fnParseUint, s0, bitSize)
}
@@ -203,7 +203,7 @@ func ParseInt(s string, base int, bitSize int) (i int64, err error) {
}
if bitSize == 0 {
- bitSize = int(IntSize)
+ bitSize = IntSize
}
cutoff := uint64(1 << uint(bitSize-1))