[Ada] Adjust code generated for overflow checking

Eric Botcazou ebotcazou@adacore.com
Tue Oct 11 10:04:00 GMT 2016

This generates an explicit comparison against 0, which yields slightly better 
code than testing directly the value.

2016-10-11  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc-interface/trans.c (gnat_to_gnu) <N_Op_Add>: Adjust comment.
	<N_Op_Minus>: Add comment and missing guard.
	* gcc-interface/trans.c (build_binary_op_trapv): Use an explicit test.

Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p.diff
Type: text/x-patch
Size: 1868 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20161011/3d99cc96/attachment.bin>

More information about the Gcc-patches mailing list