go/src/strconv
Ben Hoyt e1b305af02 strconv: revert ParseFloat/ParseComplex error on incorrect bitSize
This is a partial revert of https://go-review.googlesource.com/c/go/+/248219
because we found that a non-trivial amount of code erroneously calls
ParseFloat(s, 10) or even ParseFloat(s, 0) and expects it to work --
before that change was merged, ParseFloat accepted a bitSize of
anything other than 32 or 64 to mean 64 (and ParseComplex was similar).

So revert that behavior to avoid breaking people's code, and add tests
for this.

I may add a vet check to flag ParseFloat(s, not_32_or_64) in a later
change.

See #42297 for more details.

Change-Id: I4bc0156bd74f67a39d5561b6e5fde3f2d20bd622
Reviewed-on: https://go-review.googlesource.com/c/go/+/267319
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2020-11-03 23:05:51 +00:00
..
testdata
atob.go
atob_test.go
atoc.go strconv: revert ParseFloat/ParseComplex error on incorrect bitSize 2020-11-03 23:05:51 +00:00
atoc_test.go strconv: revert ParseFloat/ParseComplex error on incorrect bitSize 2020-11-03 23:05:51 +00:00
atof.go strconv: revert ParseFloat/ParseComplex error on incorrect bitSize 2020-11-03 23:05:51 +00:00
atof_test.go strconv: revert ParseFloat/ParseComplex error on incorrect bitSize 2020-11-03 23:05:51 +00:00
atoi.go strconv: add ParseComplex and FormatComplex 2020-05-08 17:31:38 +00:00
atoi_test.go strconv: add Unwrap to custom error types 2019-09-30 21:07:51 +00:00
ctoa.go strconv: add ParseComplex and FormatComplex 2020-05-08 17:31:38 +00:00
ctoa_test.go strconv: fix incorrect bit size in ParseComplex; add tests 2020-10-30 00:13:25 +00:00
decimal.go
decimal_test.go
doc.go
eisel_lemire.go strconv: add eiselLemire32 2020-10-23 00:39:08 +00:00
example_test.go strconv: reformat and tidy comments in example 2019-11-11 19:56:33 +00:00
export_test.go
extfloat.go strconv: remove extfloat.go atof code path 2020-10-29 03:06:12 +00:00
fp_test.go
ftoa.go
ftoa_test.go strconv: fix incorrect bit size in ParseComplex; add tests 2020-10-30 00:13:25 +00:00
internal_test.go strconv: implement parseFloatPrefix returning no. of bytes consumed 2020-04-30 03:50:03 +00:00
isprint.go unicode: upgrade to Unicode 13.0.0 2020-08-20 13:41:13 +00:00
itoa.go
itoa_test.go
makeisprint.go
quote.go strconv: stop describing Unicode graphic characters as non-ASCII 2020-01-26 20:38:34 +00:00
quote_test.go all: avoid string(i) where i has type int 2020-02-26 04:38:19 +00:00
strconv_test.go