Message ID | 20130720184112.GA14359@redhat.com |
---|---|
State | New |
Headers | show |
On Sat, 20 Jul 2013, Marek Polacek wrote:
> Ok for ubsan branch?
I explicitly have no comments on this branch patch. When there's
something for trunk I'll review that patch as a whole.
--- gcc/c/c-typeck.c.mp3 2013-07-20 20:28:36.841214356 +0200 +++ gcc/c/c-typeck.c 2013-07-20 20:29:36.646445839 +0200 @@ -10493,6 +10493,8 @@ build_binary_op (location_t location, en /* OP0 and/or OP1 might have side-effects. */ op0 = c_save_expr (op0); op1 = c_save_expr (op1); + op0 = c_fully_fold (op0, false, NULL); + op1 = c_fully_fold (op1, false, NULL); if (doing_div_or_mod) instrument_expr = ubsan_instrument_division (location, op0, op1); else if (doing_shift)