[Bug d/91916] Maybe a dead code in socket.d

ibuclaw at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sat Feb 8 08:13:00 GMT 2020


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91916

--- Comment #3 from ibuclaw at gcc dot gnu.org ---
(In reply to Martin Liška from comment #2)
> @Iain: ping^2

Hi, sorry for the late pick-up, I guess the dead code must come from this line.

https://github.com/dlang/phobos/blob/25f38e4b7f2eb4814198ef38dbc44b6ac7b92f78/std/socket.d#L3248-L3251

And whoever wrote the std.socket interface decided to mix multiple different C
enums into one type, so of course there'll be a clash between values.

It does serve to confuse if someone passes a non-time related socket option to
that particular get/setOption override, as the exception message will point to
another value than the one they have actually passed.  There is otherwise no
risk of there actually being any problem in production code.


More information about the Gcc-bugs mailing list