On 07/30/2015 10:52 AM, Jason Merrill wrote:
This hunk is necessary as we don't use canonical-form produced by
shorten_compare anymore. Therefore special operand can occur on
right-hand side too.
That seems like a problem, if the middle end is expecting the canonical
form. What is your plan for dealing with shorten_compare issues, again?
We want to handle the shorten_compare stuff independently of delayed
folding if at all possible. It's a bit of a rats nest.
One of the general problems we have is that shorten_compare also does
canonicalization and issues warnings. If we're no longer getting into
shorten_compare for some code, then that canonicalization isn't being done.
Note, anything outside of the C/C++ front-ends depending on that
canonicalization done by shorten_compare is, IMHO, broken.
I've extracted a patch from Kai's shorten_compare work to move the
canonicalization into match.pd *but* that runs into testsuite
regressions because shorten_compare is also where we emit certain
warnings for comparisons that are always true/false.
With the canonicalization moved to match.pd, shorten_compare no longer
recognizes a particular sequence and we lose the warning. I haven't yet
found a good place to relocate that warning. This has been pushed down
several items in my TODO stack.
Jeff