[Bug c++/44786] New: -fcatch-undefined-behavior: Turn on runtime code generation to check for undefined behavior
manu at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Fri Jul 2 16:47:00 GMT 2010
Clang provides a number of ways to control code generation. The options are
listed below.
-fcatch-undefined-behavior: Turn on runtime code generation to check for
undefined behavior.
This option, which defaults to off, controls whether or not Clang adds
runtime checks for undefined runtime behavior. If the check fails,
__builtin_trap() is used to indicate failure. The checks are:
# Subscripting where the static type of one operand is variable which is
decayed from an array type and the other operand is greater than the size of
the array or less than zero.
# Shift operators where the amount shifted is greater or equal to the
promoted bit-width of the left-hand-side or less than zero.
# If control flow reaches __builtin_unreachable.
--
Summary: -fcatch-undefined-behavior: Turn on runtime code
generation to check for undefined behavior
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: enhancement
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: manu at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44786
More information about the Gcc-bugs
mailing list