]> Cypherpunks.ru repositories - gostls13.git/commitdiff
go/types, types2: remove unnecessary assert on pointer size
authorRob Findley <rfindley@google.com>
Tue, 11 Jul 2023 19:54:48 +0000 (15:54 -0400)
committerGopher Robot <gobot@golang.org>
Mon, 17 Jul 2023 21:22:16 +0000 (21:22 +0000)
As described in #61249, uncommon pointer sizes do exist. Remove an
unnecessary assertion.

Fixes #61249

Change-Id: Ib15857bd6bcd42ec530817a132bb8db036236c3b
Reviewed-on: https://go-review.googlesource.com/c/go/+/508821
Reviewed-by: Robert Griesemer <gri@google.com>
Auto-Submit: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

src/cmd/compile/internal/types2/const.go
src/go/types/const.go

index 9be578c6470861f2ca9d55d7623ec606360a86f1..af27c727dd2e70d68a3ddbad2e9ee69875d0f7c9 100644 (file)
@@ -73,7 +73,6 @@ func representableConst(x constant.Value, check *Checker, typ *Basic, rounded *c
 
        sizeof := func(T Type) int64 {
                s := conf.sizeof(T)
-               assert(s == 4 || s == 8)
                return s
        }
 
index 66fa60804f57677846a696307e6ad48015187cb6..bffea146a0c7cb9bb331c11a694a659e675d2f3b 100644 (file)
@@ -74,7 +74,6 @@ func representableConst(x constant.Value, check *Checker, typ *Basic, rounded *c
 
        sizeof := func(T Type) int64 {
                s := conf.sizeof(T)
-               assert(s == 4 || s == 8)
                return s
        }