UB(short form of "Undefined Behavior",means something not lead to compile error but not defined) is easy to be ignored. In Codeforces the judge will report UB but in some contest UB may lead to running in a right way in DEVC++ or other local compilor,making it harder to prevent.
I've found that -Wall -Wextra won't report them all and '-fsanitize=undefined',which was mentioned and recommanded in articles I can find in Bing,is not supported in original Devc++(report "Cannot find '-lubsan'") or g++ in Linux,making it unable to be used in contests like CNOI or even CSP.I want to know if there's any other way to prevent in original local compilor.(Huge thanks if there's someone who can provide me with his experience about preventing UB in CNOI or CSP or NOIP).



