This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Document __builtin_*_overflow


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]