sadly, compiler writers seem to have little interest in that, and prefer to optimize out logic which would protect against protection-critical varieties of UB if it does not protect against what would normally be https://www.darkexploits.com/product/extremely-silent-jpg-exploit-new/