Re: [C++ Patch] PR 51404

2011-12-05 Thread Paolo Carlini
Hi, Hmm, I think giving the additional error was intentional, which is why we check for error_operand_p after giving it. But I suppose I'm not attached to that. We could avoid reformatting by adding if (error_operand_p (bounds)) /* Already gave an error. */; OK either way. Thanks. Thus

Re: [C++ Patch] PR 51404

2011-12-05 Thread Jason Merrill
Hmm, I think giving the additional error was intentional, which is why we check for error_operand_p after giving it. But I suppose I'm not attached to that. We could avoid reformatting by adding if (error_operand_p (bounds)) /* Already gave an error. */; OK either way. Jason

[C++ Patch] PR 51404

2011-12-04 Thread Paolo Carlini
Hi, for this ice on invalid, 4.7 Regression, the idea is just early returning error_mark_node from build_functional_cast, after the error, like in all the other error conditions explicitly dealt with there, instead of setting type = error_mark_node. The catch is, for testcases like auto25.C: