Comment

Comment by dkarapetyan

I don't understand the example

  bool g(bool b) {
    if (b)
      return true;
    int unused = 1 / 0;
    return false;
  }
Shouldn't it be optimized to

  bool g(bool b) {
    return b;
  }
instead of

  bool g(bool b) {
    return true;
  }
parent dkarapetyan 10 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton