You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
var epevent syscall.EpollEvent
epevent.Events |= syscall.EPOLLET
What is the expected output? What do you see instead?
Code fails to compile:
constant -2147483648 overflows uint32
What is your $GOOS? $GOARCH?
GOARCH="amd64"
GOOS="linux"
Which revision are you using? (hg identify)
95355ede92ce tip
The text was updated successfully, but these errors were encountered:
A possible workaround is:
epevent.Events |= syscall.EPOLLET & 0xffffffff
but maybe something can be done in the syscall package or the language to make this bit
mask unnecessary.
This is not a language or compiler problem, the value syscall.EPOLLET is negative
(-0x80000000) and thus
cannot be represented as (or'ed to) a uint32 w/o loss of precision.
Your "work-around" is the correct approach in this case, in Go one has to be explicit
about loosing precision
with constants.
Alternatively, perhaps the constant syscall.EPOLLET shouldn't be negative in the first
place - but that would be
an issue with godefs as this package is automatically generated.
Closing for now as this works as intended.
The text was updated successfully, but these errors were encountered: