diff options
author | David Malcolm <dmalcolm@redhat.com> | 2022-04-05 16:43:16 -0400 |
---|---|---|
committer | David Malcolm <dmalcolm@redhat.com> | 2022-04-05 16:43:16 -0400 |
commit | 0b5723d74f3a731380f78dc1a02a2376951388cf (patch) | |
tree | 0234f1a9c2d9c276ac795736f80edafcba53a138 /gcc | |
parent | 4b3247f6546ea5bc79aaba7d6f03222ec94a293f (diff) | |
download | gcc-0b5723d74f3a731380f78dc1a02a2376951388cf.zip gcc-0b5723d74f3a731380f78dc1a02a2376951388cf.tar.gz gcc-0b5723d74f3a731380f78dc1a02a2376951388cf.tar.bz2 |
Document that the 'access' and 'nonnull' attributes are independent
gcc/ChangeLog:
* doc/extend.texi (Common Function Attributes): Document that
'access' does not imply 'nonnull'.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/doc/extend.texi | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index 8381eb6..e10b10b 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend.texi @@ -2652,6 +2652,14 @@ The mode is intended to be used as a means to help validate the expected object size, for example in functions that call @code{__builtin_object_size}. @xref{Object Size Checking}. +Note that the @code{access} attribute merely specifies how an object +referenced by the pointer argument can be accessed; it does not imply that +an access @strong{will} happen. Also, the @code{access} attribute does not +imply the attribute @code{nonnull}; it may be appropriate to add both attributes +at the declaration of a function that unconditionally manipulates a buffer via +a pointer argument. See the @code{nonnull} attribute for more information and +caveats. + @item alias ("@var{target}") @cindex @code{alias} function attribute The @code{alias} attribute causes the declaration to be emitted as an alias |