Skip to content

Commit 79a3b56

Browse files
committed
cmd/compile/internal/gc: remove special handling for -0.0
Per the latest spec change, Go doesn't have -0 constants. Change-Id: Ic2bcdc3bf507d121ed204f30f6744bb8764202c0 Reviewed-on: https://go-review.googlesource.com/16232 Reviewed-by: Chris Manghane <[email protected]>
1 parent ae2f54a commit 79a3b56

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

src/cmd/compile/internal/gc/bexport.go

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -713,20 +713,11 @@ func (p *exporter) value(x Val) {
713713
}
714714

715715
func (p *exporter) float(x *Mpflt) {
716-
// extract sign, treat -0 as < 0
716+
// extract sign (there is no -0)
717717
f := &x.Val
718718
sign := f.Sign()
719719
if sign == 0 {
720-
// ±0
721-
// TODO(gri) remove 'if' below if #12577 gets accepted
722-
if f.Signbit() {
723-
// -0 (uncommon)
724-
p.int(-1)
725-
p.int(0)
726-
p.string("")
727-
return
728-
}
729-
// +0
720+
// x == 0
730721
p.int(0)
731722
return
732723
}

0 commit comments

Comments
 (0)