On 5/16/21 7:57 AM, Joern Rennecke wrote:
When you have lots of operands and lots of alternatives in a pattern,
it is often not immediately apparent if the problem is in the
indicated alternative or in the one that genoutput uses as a reference
for the 'correct' number of alternatives, and/or if you dropped a
comma or had one too many. By making genoutput tell you what the
argument counts are, this gets a little bit easier.
Bootstrapped on x86_64-pc-linux-gnu.
I think it's very helpful to provide this sort of detail. Just as
a matter of readability, the new error message
"wrong number of alternatives in operand %d, %d, expected %d"
would be improved by avoiding the two consecutive %d's, e.g., by
rephrasing it like so:
"%d alternatives provided to operand %d where %d are expected"
or similar (see gcc/po/gcc.pot for examples). I would suggest to
consider adjusting it.
Martin