GCC optimize ("trapv")

Revision en1, by Bhj2001, 2020-01-19 23:13:20
 #pragma GCC optimize ("trapv") // kills the program on integer overflows (but is really slow).

This helps a lot in testing. If a solution fails on a particular test case this can help in finding the bug.
This works on my computer but does not work on Codeforces.
Is there an alternative to this on online judges?

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Bhj2001 2020-01-19 23:13:20 373 Initial revision (published)