On 1/31/22 11:28 AM, Segher Boessenkool wrote: > On Mon, Jan 31, 2022 at 11:21:32AM -0600, Bill Schmidt wrote: >> On 1/28/22 5:24 PM, Segher Boessenkool wrote: >>> On Fri, Jan 28, 2022 at 11:50:21AM -0600, Bill Schmidt wrote: >>>> When introducing the new built-in support, I tried to match as many >>>> existing error messages as possible. One common form was "argument X must >>>> be a Y-bit unsigned literal". Another was "argument X must be a literal >>>> between X' and Y', inclusive". During reviews, Segher requested that I >>>> eventually convert all messages of the first form into the second form for >>>> consistency. That's what this patch does, replacing all <x>-form >>>> constraints (first form) with <x,y>-form constraints (second form). >>> Well, I asked for the error messages to be clearer and more consistent >>> like that. I don't think changing our source code like this is an >>> improvement (*we* know what a 5-bit signed number is). Do you think >>> after your patch it is clearer and we will make fewer errors? >> No, I don't think the patch is a particular improvement. It sounds like >> I may have misinterpreted what you were looking for here. Please let me >> know what I might do differently. >> >> For example, if we leave the <x> format in place in the source, I could >> change the error messages that we produce to calculate the minimum and >> maximum allowed values. Then we'd still have the changes to the test >> cases, but fewer changes to the source. Thoughts? > That is exactly what I asked for, and what I still think is the best > option. I haven't tried it out though, so there may be arguments > against this :-)
Thanks for the clarification! I'll make a run at it. Bill > > Segher