This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On Fri, Nov 18, 2016 at 04:29:18PM +0100, Dominik Vogt wrote: > On Fri, Nov 18, 2016 at 08:02:08AM -0600, Segher Boessenkool wrote: > > On Fri, Nov 18, 2016 at 01:09:24PM +0100, Dominik Vogt wrote: > > > IN_RANGE(POS...) makes sure that POS is a non-negative number > > > smaller than UPPER, so (UPPER) - (POS) does not wrap. Or is there > > > some case that the new macro does not handle? > > > > I think it works fine. > > > > With a name like UPPER, you may want to have SIZE_POS_IN_RANGE work like > > IN_RANGE, i.e. UPPER is inclusive then. Dunno. > > Yeah, maybe rather call it RANGE to avoid too much similarity. > Some name that is so vague that one has to read the documentation. > I'll post an updated patch later. Third version of the patch attached. The only difference is that the macro argument name has been changed back to RANGE. Ciao Dominik ^_^ ^_^ -- Dominik Vogt IBM Germany
Attachment:
0001-v3-ChangeLog
Description: Text document
Attachment:
0001-v3-PR-target-77822-Add-helper-macro-SIZE_POS_IN_RANGE-t.patch
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |