Hacker News new | ask | show | jobs
by vtsrh 3994 days ago
Well the solution is simple:

  return (x+0U)<<16 | (y+0U);
Would it be insane to have a inline library for every arithmetic operation, that would handle such cases and offer addition optional functionality?
1 comments

The intersection of people who are willing to rewrite all their arithmetic to use such a library with people who are not willing to switch to a non-C language is rather small.
Keep the old code, instead just start using it for new one.
Most projects still written in C are those that make extensive use of C libraries. Making the application code immune doesn't actually reduce the vulnerability surface much - much of the vulnerability comes in the libraries the application calls.
Use it for new code. Libraries are written too.
Libraries are usually older than the applications that use them. New libraries can be, and often are, written in new languages.
https://news.ycombinator.com/item?id=9885478

Looks like you hit an infinite loop. Better luck next time.