← Back to context Comment by secondcoming 4 hours ago Let's not vague post on HN. What's the problem with the above? 3 comments secondcoming Reply saagarjha 43 minutes ago The problem is the code unconditionally dereferences the pointer, which would be UB if it was a null pointer. This means it is legal to optimize out any code paths that rely on this, even if they occur earlier in program order. aw1621107 30 minutes ago > The problem is the code unconditionally dereferences the pointer, which would be UB if it was a null pointer.Only when NDEBUG is defined, right? saagarjha 13 minutes ago No, the code that does this is always active
saagarjha 43 minutes ago The problem is the code unconditionally dereferences the pointer, which would be UB if it was a null pointer. This means it is legal to optimize out any code paths that rely on this, even if they occur earlier in program order. aw1621107 30 minutes ago > The problem is the code unconditionally dereferences the pointer, which would be UB if it was a null pointer.Only when NDEBUG is defined, right? saagarjha 13 minutes ago No, the code that does this is always active
aw1621107 30 minutes ago > The problem is the code unconditionally dereferences the pointer, which would be UB if it was a null pointer.Only when NDEBUG is defined, right? saagarjha 13 minutes ago No, the code that does this is always active
The problem is the code unconditionally dereferences the pointer, which would be UB if it was a null pointer. This means it is legal to optimize out any code paths that rely on this, even if they occur earlier in program order.
> The problem is the code unconditionally dereferences the pointer, which would be UB if it was a null pointer.
Only when NDEBUG is defined, right?
No, the code that does this is always active