tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: EV_SET() better C++ compat with alternative implementations



On 13.08.2019 21:21, Joerg Sonnenberger wrote:
> On Tue, Aug 13, 2019 at 08:44:04PM +0200, Kamil Rytarowski wrote:
>> void* does not prevent storing inside it numbers.
> 
> While not necessarily relevant in the NetBSD context, this is generally
> false. Casting random values to a pointer is UB.
> 
> Joerg
> 

This is not a general rule, but it's the current practice. We e.g. pass
number 1 (of type void*) in 3rd argument in ptrace(2) for PT_CONTINUE.

There was a proposal for C1x or C2x to make it formally defined.

Attachment: signature.asc
Description: OpenPGP digital signature



Home | Main Index | Thread Index | Old Index