On Thu, 26 Nov 2015, Jakub Jelinek wrote: > > > But the condition whether to call c_save_expr or whether to call save_expr > > > instead is not constant in the C FE. > > > If c_fully_fold is expected to be called on the expression, then > > > c_save_expr > > > needs to be used, otherwise save_expr. > > > Can we rely on in_late_binary_op for that? > > > > Yes, I think so. > > It seems only to be set temporarily when calling convert*, then reset > back, while we supposedly want to use save_expr instead of c_save_expr also > at the point where we are genericizing, or gimplifying etc.
OK, then we may need a new flag that indicates that we are doing some processing after all the constant expression checks from parsing have been done. (With an eventual preference that anything creating SAVE_EXPRs at all should happen at that late stage - that the front-end representation created during parsing should be closer to the source, including not needing to refer more than once to a given source expression, and genericizing / gimplifying / some such lowering step handling semantics that require SAVE_EXPRs.) -- Joseph S. Myers jos...@codesourcery.com