This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] docs: constify argument to __builtin_object_size()
- From: Jakub Kicinski <jakub dot kicinski at netronome dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Jakub Kicinski <jakub dot kicinski at netronome dot com>
- Date: Fri, 11 Nov 2016 13:40:18 +0000
- Subject: [PATCH] docs: constify argument to __builtin_object_size()
- Authentication-results: sourceware.org; auth=none
It's OK to pass const pointers to __builtin_object_size(),
correct the documentation.
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
---
gcc/doc/extend.texi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index 0669f7999beb..4378ab84b5d8 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -10110,7 +10110,7 @@ follow pointer assignments through non-trivial control flow they rely
on various optimization passes enabled with @option{-O2}. However, to
a limited extent, they can be used without optimization as well.
-@deftypefn {Built-in Function} {size_t} __builtin_object_size (void * @var{ptr}, int @var{type})
+@deftypefn {Built-in Function} {size_t} __builtin_object_size (const void * @var{ptr}, int @var{type})
is a built-in construct that returns a constant number of bytes from
@var{ptr} to the end of the object @var{ptr} pointer points to
(if known at compile time). @code{__builtin_object_size} never evaluates
--
1.9.1