This adds a disclaimer discouraging use of -fwrapv-pointer.
Built docs and inspected pdf.
OK?
Thanks,
Richard.
* doc/invoke.texi (fwrapv-pointer): Add disclaimer.
---
gcc/doc/invoke.texi | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index d874dd65f11..6398b142047 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -19276,7 +19276,11 @@ results in @option{-ftrapv} being effective.
This option instructs the compiler to assume that pointer arithmetic
overflow on addition and subtraction wraps around using twos-complement
representation. This flag disables some optimizations which assume
-pointer overflow is invalid.
+pointer overflow is invalid. @strong{Warning:} this option exists because
+of the Linux Kernels view of what C is. It does @strong{not} turn pointers
+into twos-complement numbers or eliminates all rules and guarantees the C
+standard has on pointers. @strong{Do not use} this option but rather write
+conforming C.
@opindex fstrict-overflow
@opindex fno-strict-overflow
--
2.51.0