On Fri, 13 Nov 2015, Jason Merrill wrote: > In the future we probably want to move many of these warnings into > language-independent code so we can avoid folding for them in the front end; > we also shouldn't need to fold during genericization, but apparently not doing > that leads to optimization regressions.
We have similar issues for C: various places in the C front end call c_fully_fold because folded trees are needed for warnings rather than any language semantics needing folding. (Others call it when a tree is about to be wrapped in something that c_fully_fold doesn't unwrap, which could be avoided by handling more C-specific trees at genericization time.) -- Joseph S. Myers jos...@codesourcery.com