From: Ian Lance Taylor Date: Thu, 17 Apr 2014 23:13:39 +0000 (+0000) Subject: gofrontend: avoid use of unsafe.Sizeof extension X-Git-Tag: releases/gcc-5.1.0~8044 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e315e8a5b9386a91adf31910760da6cc1b9ca487;p=thirdparty%2Fgcc.git 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. From-SVN: r209503 --- diff --git a/libgo/go/syscall/libcall_posix.go b/libgo/go/syscall/libcall_posix.go index 8f5b02075836..b9c2d7f9b000 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