Comment

Comment by thomashabets2

Author here: yes and no.

UB can also be things that the compiler is unable to express. It's NOT "haha, now I can do anything", it's like asking what the correct answer is to a logically inconsistent question. The compiler cannot even express the question.

Let's say the compiler encodes some GC information in the low two bits of int pointers. What does it mean if a function is called with an unaligned pointer, then? Mu, unask the question. It's UB, and no diagnostic required nor even feasible.

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton