This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Document __builtin_*_overflow
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Gerald Pfeifer <gerald at pfeifer dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 25 Nov 2014 20:08:59 +0100
- Subject: Re: Document __builtin_*_overflow
- Authentication-results: sourceware.org; auth=none
- References: <20141112131352 dot GZ5026 at tucnak dot redhat dot com> <alpine dot LSU dot 2 dot 11 dot 1411251948460 dot 13258 at tuna dot site>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Tue, Nov 25, 2014 at 07:50:02PM +0100, Gerald Pfeifer wrote:
> Hi Jakub,
>
> On Wednesday 2014-11-12 14:13, Jakub Jelinek wrote:
> > This patch mentions __builtin_*_overflow in gcc-5/changes.html.
> > Ok for CVS?
>
> I've fallen a bit behind with GCC patches, sorry.
>
> What do you think about this follow-up patch on top of yours?
LGTM, thanks.
> --- changes.html 23 Nov 2014 14:42:28 -0000 1.41
> +++ changes.html 25 Nov 2014 18:49:02 -0000
> @@ -157,14 +157,14 @@
> These builtins have two integral arguments (which don't need to have
> the same type), the arguments are extended to infinite precision
> signed type, <code>+</code>, <code>-</code> or <code>*</code>
> - is performed on those and the result is stored into some integer
> - variable pointed by the last argument. If the stored value is equal
> - to the infinite precision result, the built-in functions return
> + is performed on those, and the result is stored in an integer
> + variable pointed to by the last argument. If the stored value is
> + equal to the infinite precision result, the built-in functions return
> <code>false</code>, otherwise <code>true</code>. The type of
> the integer variable that will hold the result can be different from
> - the types of arguments. The following snippet demonstrates how
> - this can be used in computing the size for the <code>calloc</code>
> - function:
> + the types of the first two arguments. The following snippet
> + demonstrates how this can be used in computing the size for the
> + <code>calloc</code> function:
> <blockquote><pre>
> void *
> calloc (size_t x, size_t y)
> @@ -177,8 +177,8 @@
> return ret;
> }
> </pre></blockquote>
> - On e.g. i?86 or x86-64 the above will result in <code>mul</code>
> - instruction followed by jump on overflow.
> + On e.g. i?86 or x86-64 the above will result in a <code>mul</code>
> + instruction followed by a jump on overflow.
> </li>
> <li>The option <code>-fextended-identifiers</code> is now enabled
> by default for C++, and for C99 and later C versions. Various
>
> Gerald
Jakub