Slacker News Slacker News logo featuring a lazy sloth with a folded newspaper hat
  • top
  • new
  • show
  • ask
  • jobs
Library
← Back to context

Comment by eru

3 years ago

That's the only way to use C correctly.

Alas, it's nearly impossible for a mere mortal to write any non-trivial C code that doesn't have UB.

1 comment

eru

Reply

pjc50  3 years ago

"a+b" for signed integer types potentially invokes undefined behavior (overflow). It's a horrendous situation.

Slacker News

Product

  • API Reference
  • Hacker News RSS
  • Source on GitHub

Community

  • Support Ukraine
  • Equal Justice Initiative
  • GiveWell Charities