No! I said don't google that! :) UB has nothing to do with C compilers specifically. But it's unsurprising that this get most hits. 1/
-
-
But yes, UB does not mean "we don't define what happens when X (with X being something like div by zero)". UB means we only define behavior
1 reply 0 retweets 0 likes -
for programs/systems/whatever that do not do X. If this happens anywhere, all bets are off. Same with a CPU. This is different from things
1 reply 0 retweets 0 likes -
that are "implementation defined", or "unspecified", or "unpredictable". Full blown UB means: X happens anywhere, even in the future, and
1 reply 0 retweets 0 likes -
the entire spec goes out the window and the system can do whatever it wants. UB is part of the contract between system and user, and the
1 reply 0 retweets 1 like -
user must guarantee that the UB is never ever triggered by their program.
1 reply 0 retweets 1 like -
Replying to @oe1cxw
AIUI, UB is sometimes necessary for speed and to prevent state space explosion for realizable impls of software/hardware. So what I ended >>
1 reply 0 retweets 0 likes -
up doing when seeing your example near the beginning of the thread was asking: "How _would_ I end up creating an impl that orders pizza >>
1 reply 0 retweets 1 like -
when a write to misa/C was detected and PC was misaligned, just for the hell of it :)" For an in-order impl, I can't think of how to do it.
2 replies 0 retweets 0 likes -
Replying to @cr1901
You are approaching the topic from the wrong end: If the nop order pizza, how will you ever know that it's a bug? That's the problem 1/
1 reply 0 retweets 0 likes
that I'm dealing with. When riscv-formal sees an instruction that does something strange I need a mechanism top decide if that's a bug.
-
-
And if that mechanism requires me to solve the halting problem then I'm in big troubles.
1 reply 0 retweets 1 like -
Replying to @oe1cxw
I understand now. Thanks for humoring me taking your example literally. (Btw, I would embed a tiny modem w/ hardcoded phone number)
1 reply 0 retweets 1 like - Show replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.