aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMartin Sebor <msebor@redhat.com>2018-10-24 19:33:56 +0000
committerMartin Sebor <msebor@gcc.gnu.org>2018-10-24 13:33:56 -0600
commita703b16ba4c641e3e23f2630f9ae13d50fc9d7cf (patch)
tree0de0665c6801191b919340af0c0a84c7de7f6a69 /gcc
parentfd85b88869cca061959582783d5ec75b0da8b1d7 (diff)
downloadgcc-a703b16ba4c641e3e23f2630f9ae13d50fc9d7cf.zip
gcc-a703b16ba4c641e3e23f2630f9ae13d50fc9d7cf.tar.gz
gcc-a703b16ba4c641e3e23f2630f9ae13d50fc9d7cf.tar.bz2
extend.texi (nonnull): List no-argument form.
gcc/ChangeLog: * doc/extend.texi (nonnull): List no-argument form. Reference -fno-delete-null-pointer-checks and -fisolate-erroneous-paths-attribute. From-SVN: r265469
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/doc/extend.texi16
2 files changed, 16 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 0f015ee..1547b6f 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2018-10-24 Martin Sebor <msebor@redhat.com>
+
+ * doc/extend.texi (nonnull): List no-argument form. Reference
+ -fno-delete-null-pointer-checks and -fisolate-erroneous-paths-attribute.
+
2018-10-24 Richard Biener <rguenther@suse.de>
* tree-ssa-sccvn.c (do_rpo_vn): Free rpo_state.
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index 34ecc4f..25c821d 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -3075,7 +3075,8 @@ including those that do not have an attribute suitable for disabling
them individually. This attribute is supported mainly for the purpose
of testing the compiler.
-@item nonnull (@var{arg-index}, @dots{})
+@item nonnull
+@itemx nonnull (@var{arg-index}, @dots{})
@cindex @code{nonnull} function attribute
@cindex functions with non-null pointer arguments
The @code{nonnull} attribute specifies that some function parameters should
@@ -3092,10 +3093,15 @@ causes the compiler to check that, in calls to @code{my_memcpy},
arguments @var{dest} and @var{src} are non-null. If the compiler
determines that a null pointer is passed in an argument slot marked
as non-null, and the @option{-Wnonnull} option is enabled, a warning
-is issued. The compiler may also choose to make optimizations based
-on the knowledge that certain function arguments will never be null.
-
-If no argument index list is given to the @code{nonnull} attribute,
+is issued. @xref{Warning Options}. Unless disabled by
+the @option{-fno-delete-null-pointer-checks} option the compiler may
+also perform optimizations based on the knowledge that certain function
+arguments cannot be null. In addition,
+the @option{-fisolate-erroneous-paths-attribute} option can be specified
+to have GCC transform calls with null arguments to non-null functions
+into traps. @xref{Optimize Options}.
+
+If no @var{arg-index} is given to the @code{nonnull} attribute,
all pointer arguments are marked as non-null. To illustrate, the
following declaration is equivalent to the previous example: