← Back to context

Comment by bregma

1 day ago

Are you asking if there are programming languages in which how undefined behaviour behaves is strictly defined?

I’m talking about the “non-local” flavor of undefined behavior. For example, I’d expect the following code:

  int x;
  printf("%d", x - x);

to always print 0, but it can it fact do anything at all.