From: Xi Ruoyao Date: Wed, 24 Sep 2025 06:26:11 +0000 (+0800) Subject: docs: Note that -fisolate-erroneous-paths-dereference turns division by zero into... X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=82edaadc6bd0e848219764a00c096d14c7eb9550;p=thirdparty%2Fgcc.git docs: Note that -fisolate-erroneous-paths-dereference turns division by zero into a trap [PR 122040] And this behavior is not limited to -fdelete-null-pointer-checks. gcc/ PR tree-optimization/122040 * doc/invoke.texi (-fisolate-erroneous-paths-dereference): Mention it also turns division by zero into a trap in addition to null dereference. --- diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index be9242aa7e4..7ce722d8365 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -14359,10 +14359,10 @@ Note that @option{-flive-patching} is not supported with link-time optimization @opindex fisolate-erroneous-paths-dereference @item -fisolate-erroneous-paths-dereference Detect paths that trigger erroneous or undefined behavior due to -dereferencing a null pointer. Isolate those paths from the main control -flow and turn the statement with erroneous or undefined behavior into a trap. -This flag is enabled by default at @option{-O2} and higher and depends on -@option{-fdelete-null-pointer-checks} also being enabled. +dereferencing a null pointer (with @option{-fdelete-null-pointer-checks} +enabled) or a division by zero. Isolate those paths from the main control +flow and turn the statement with erroneous or undefined behavior into a +trap. This flag is enabled by default at @option{-O2} and higher. @opindex fisolate-erroneous-paths-attribute @item -fisolate-erroneous-paths-attribute