Commit 35ca24a2 by Jakub Jelinek Committed by Jakub Jelinek

extend.texi (__builtin_add_overflow_p): Clarify behavior when last argument is a bit-field.

	* doc/extend.texi (__builtin_add_overflow_p): Clarify behavior when
	last argument is a bit-field.

From-SVN: r237816
parent 95ef39f4
2016-06-28 Jakub Jelinek <jakub@redhat.com> 2016-06-28 Jakub Jelinek <jakub@redhat.com>
* doc/extend.texi (__builtin_add_overflow_p): Clarify behavior when
last argument is a bit-field.
PR rtl-optimization/71673 PR rtl-optimization/71673
* internal-fn.c (expand_arith_overflow_result_store): Use * internal-fn.c (expand_arith_overflow_result_store): Use
OPTAB_LIB_WIDEN instead of OPTAB_DIRECT as last argument to OPTAB_LIB_WIDEN instead of OPTAB_DIRECT as last argument to
......
...@@ -9888,6 +9888,9 @@ cast to the type of the third argument. If the cast result is equal to the infi ...@@ -9888,6 +9888,9 @@ cast to the type of the third argument. If the cast result is equal to the infi
precision result, the built-in functions return false, otherwise they return true. precision result, the built-in functions return false, otherwise they return true.
The value of the third argument is ignored, just the side-effects in the third argument The value of the third argument is ignored, just the side-effects in the third argument
are evaluated, and no integral argument promotions are performed on the last argument. are evaluated, and no integral argument promotions are performed on the last argument.
If the third argument is a bit-field, the type used for the result cast has the
precision and signedness of the given bit-field, rather than precision and signedness
of the underlying type.
For example, the following macro can be used to portably check, at For example, the following macro can be used to portably check, at
compile-time, whether or not adding two constant integers will overflow, compile-time, whether or not adding two constant integers will overflow,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment