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: [PATCH] Fix -fsanitize=float-cast-overflow with C FE (PR sanitizer/64344)


On Thu, 18 Dec 2014, Jakub Jelinek wrote:

> c/
> 	* c-typeck.c (convert_for_assignment, c_finish_return): For
> 	-fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
> 	types also set in_late_binary_op around convert call.
> 	* c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
> 	to integral type casts, if not in_late_binary_op, pass c_fully_fold
> 	result on expr as last argument to ubsan_instrument_float_cast,
> 	if in_late_binary_op, don't use c_save_expr but save_expr.

The C front-end changes are OK.

-- 
Joseph S. Myers
joseph@codesourcery.com


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