diff options
author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-04-17 23:13:39 +0000 |
---|---|---|
committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-04-17 23:13:39 +0000 |
commit | df4a4c96823f0c09e36c51e40f5c064d6d462a03 (patch) | |
tree | 4ed3d357f795efbd0d8b9aed66dc4951691f0a2e /libgo | |
parent | 3745afdbcc247c091437aadb9ebf0eaadac5cab5 (diff) | |
download | gcc-df4a4c96823f0c09e36c51e40f5c064d6d462a03.tar.gz |
gofrontend: avoid use of unsafe.Sizeof extension
Avoid the use of a gccgo language extension which allows unsafe.Sizeof
to accept a type by passing an expression of the relevant type.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@209503 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgo')
-rw-r--r-- | libgo/go/syscall/libcall_posix.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libgo/go/syscall/libcall_posix.go b/libgo/go/syscall/libcall_posix.go index 8f5b0207583..b9c2d7f9b00 100644 --- a/libgo/go/syscall/libcall_posix.go +++ b/libgo/go/syscall/libcall_posix.go @@ -138,7 +138,7 @@ func (w WaitStatus) TrapCause() int //sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) //select(nfd _C_int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) _C_int -const nfdbits = int(unsafe.Sizeof(fds_bits_type) * 8) +const nfdbits = int(unsafe.Sizeof(fds_bits_type(0)) * 8) type FdSet struct { Bits [(FD_SETSIZE + nfdbits - 1) / nfdbits]fds_bits_type |