← Back to context

Comment by uecker

3 days ago

For GCC I have a patch (maybe 10 lines of code) that emits a warning whenever the compiler inserts a trap. You could use a sanitizer, i.e. bounds checking or signed overflow, add code that turns the warning into an error, and so ensure that your code does not have a signed overflow or OOB.

That sounds like a useful patch. Why didn't you upstream it?

  • I submitted it upstream but it was not accepted. There was a request to add a string argument that can be printed with the warning.