[PATCH] Add save_expr langhook (PR c/68513)
Joseph Myers
joseph@codesourcery.com
Sat Nov 28 16:19:00 GMT 2015
On Sat, 28 Nov 2015, Richard Biener wrote:
> Different approach: after the FE folds (unexpectedly?), scan the result
> for SAVE_EXPRs and if found, drop the folding.
Or, if conversions are going to fold from language-independent code (which
is the underlying problem here - a conversion without folding would be
preferred once the fallout from that can be resolved), make the front end
fold with c_fully_fold before doing the conversion, and wrap the result of
the conversion in a C_MAYBE_CONST_EXPR with c_wrap_maybe_const in the same
way as done in other places that fold early (if either c_fully_fold
indicates it can't occur in a constant expression, or the result of
folding / conversion is not an INTEGER_CST).
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Gcc-patches
mailing list